If I can construct a query in MongoDB to return objects with height not equal to 4 from a collection like this:
var mongoQuery = { height: { "$ne": 4 } };
Is there a way to apply a similar query logic to an in-memory array of objects using existing libraries or methods? For example:
var myArr = [{height: 5}, {height: 4}, {height:3}]
Are there any tools available that allow me to use MongoDB-like syntax on arrays instead of database collections? Such as:
var result = someUtil(myArr, {height: {"$ne": 4}}); //returns all objects with height != 4
Clarification: I am looking for a solution that can translate various MongoDB operators, not just "!=" (not equal).