node-red-contrib-mongodb2 icon indicating copy to clipboard operation
node-red-contrib-mongodb2 copied to clipboard

Find operation using msg.payload

Open 0javad0 opened this issue 4 years ago • 1 comments

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.

0javad0 avatar Oct 09 '20 00:10 0javad0

@0javad0 you could try find.toArray

s4ke avatar Nov 12 '20 17:11 s4ke