Panther is a way to search through JSON objects.
JavaScript
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
test
.gitignore
README.md
data.js
example.js
package.json
panther.js

README.md

Panther is a way to search through an array of JSON objects and get returned an array of matching JSON objects.

npm install panther

Example (see also: example.js)

var panther = require('panther');
//data is an array of JSON objects
var data = [{name:'matt', age:'17'}, {name:'oscar', age:'73'}];
var searchTerm = 'matt';

panther.search(function(err, items) {
  if (err) {
    console.log(err);
  } else {
    console.log(items); //items is an array of matching JSON objects
  }
}, searchTerm, data);