You can use DefiantJS - which enables XPath queries on JSON structures.
http://defiantjs.comhttps://github.com/hbi99/defiant.jsTry the XPath evaluator to become an expert on XPath;
http://defiantjs.com/#xpath_evaluator
var data = {
"movie": [{"id": 1, "title": "The Usual Suspects"},
{"id": 2, "title": "Pulp Fiction"},
{"id": 3, "title": "Independence Day"}]
},
res = JSON.search(data, '//*[id=2]');
console.log( res[0].title );
// Pulp fiction
As you can see, DefiantJS extends the global object JSON with the search method. Check out the documentation for more details.