ozomer / node-red-contrib-mongodb2

MongoDB driver node for Node-RED
Apache License 2.0
15 stars 19 forks source link

Find operation using msg.payload #47

Open 0javad0 opened 3 years ago

0javad0 commented 3 years ago

Hello there, I was wondering if you could check and see why the "find" operation is not supported. The "findOne" operation gently returns the value but it is not the case for "find": What I am deploying for "find" is: // msg.collection = "Collection_1" msg.operation = "find"; msg.payload = {'Name' : 'John'}; msg.limit = 2; msg.sort = {"_id":-1} return msg; // error message: "No operation defined" // or even if you have an alternative solution? sharing it it is much appreciated.

s4ke commented 3 years ago

@0javad0 you could try find.toArray