News for hackers. Stuff that matters.
Re:JavaScript query language to perform complex object searches by smizell on Monday September 21, 2015 @11:34PM (#10256493)
I've been working on library that creates a queryable structure for trees like this. I prefer writing normal JS than to having some query language for it.

  var obj = minim.toElement({
    a: 1,
    b: [
      {
        c: 1,
        d: 2,
        e: [ { f: 5 } ],
        f: 6
      }
    ]
  });

  // Results are [5, 6]
  var results = obj.find(function(value, key) {
    return key.equals('f');
  });
See https://github.com/refractproject/minim

There are no comments on this comment yet.