Javascript implementation of mongo-esque query language for collection manipulation