I was trying to create a search plugin for my custom table plugin.

In my search I use 

```
function getObjects(obj, key, val, path) {
    for (var prop in obj) {
        if (prop == key && obj[key].toLowerCase().match(val)) {
            result.push(passName);
            matchFlag = 1;
        }
    }
}

```

where 

* obj -> JSON
* key -> search filter
* val -> search keyword will be like '^m'

This works as long as the search keyword is a string/character.

How to handle scenario where search keyword is numeric? I tried using indexOf also.