Stephen,

For simple AND filters, there's `_.where()`. For robust filtering, 
grouping, bisecting, etc, there's crossfilter 
(https://github.com/square/crossfilter). Another alternative I've seen is 
the underscore mixin _.data (aka 
_.query) https://github.com/dvv/underscore-data, which has a pull request 
to make it compatible with node, but crossfilter looks much more mature.

On Thursday, February 28, 2013 5:20:48 PM UTC-8, Stephen Bartell wrote:
>
> My goal is to allow a user to specify a filter a la json. And then use the 
> filter on incoming json documents. I'm pretty much looking for an 
> implementation similar to mongodb's query command.  Maybe theres something 
> better than the mongo way, I dont know.  I just want filters defined in 
> json.
>
> For example here is a doc
>
> doc: {
>   "num": 1234,
>   "name": "foobar"
> }
>
> and here is the query:
>
> query: {"$and": [{"name": "foobar"}, {"num": {"$lt": 2000}}]} 
>
> Based on this query, my doc will pass the filter.
>
> Thanks for any help on pointing me in the right direction!
>

-- 
-- 
Job Board: http://jobs.nodejs.org/
Posting guidelines: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to