node-red-contrib-mongodb2
node-red-contrib-mongodb2 copied to clipboard
Find operation using msg.payload
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 you could try find.toArray