Is there a way to use MongoDB query objects to filter regular JavaScript arrays?

后端 未结 5 682
独厮守ぢ
独厮守ぢ 2021-02-08 22:02

In MongoDB, you can use JSON-style objects such as in the following to query a collection:

db.things.find({ x : { $ne : 3 }, y : \'foo\' });

I\

5条回答
  •  小鲜肉
    小鲜肉 (楼主)
    2021-02-08 22:19

    Underscore.js is a great library to do map/reduce kind of jobs on javascript structures. Highly recommended.

提交回复
热议问题