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

后端 未结 5 684
独厮守ぢ
独厮守ぢ 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:12

    You can use https://github.com/mirek/node-json-criteria library, which evaluates critera queries in MongoDB format on JSON objects.

提交回复
热议问题