node-red-contrib-mongodb2
node-red-contrib-mongodb2 copied to clipboard
find.toArray, count & aggregate.toArray functions issues
Hi,
I am reporting three kind of problems.
The first is with the find.toArray function that returns an object insted of an array.
The second problem is with the count and countDocuments functions, which always return an empty object.
For the second problem I've tried different payloads but nothing changes, right now i am using the find.toArray, converting the result to an array and then using the .length to have the count result but it will be a problem because i will need to query big documents in a big collection just for a count.
The third problem is related to aggregate.toArray, which is not returning the same response that i recieve from robo3t with the same parameters. For example even if i try an aggregate for the count problem, in which i put the match field and the $count operator, in mongo i am recieving the correct response meanwhile from the node I am recieving the entire list of the elements.
Thanks a lot