MongoDB like query api for JavaScript Arrays