There was an error while loading. Please reload this page.
Source: StackOverflow.com
Given a JSON object like:
var data = {items: [ {value: "21", name: "Mick Jagger"}, {value: "43", name: "Johnny Storm"}, {value: "46", name: "Richard Hatch"}, {value: "54", name: "Kelly Slater"}, {value: "55", name: "Rudy Hamilton"}, {value: "79", name: "Michael Jordan"} ]};
How can I do something like this:
datagood = data.where(value == 55)
Is something like that possible with JS?
AlaSQL library can perform more complex queries with "old good" SQL:
var res = alasql('SELECT * FROM ? WHERE value = 55',[data]);
Try this example in jsFiddle
Quick links
AlaSQL wiki frontpage
About AlaSQL
Install AlaSQL
Get started with AlaSQL