Closed number005 closed 5 years ago
Try: msg.payload = [{"age": 50}, {"fields": {"firstName": 1}}]; return msg;
Not sure if the question is for Mongo V3, but according to the V3 Docs, fields
is deprecated. I found this structure works for me:
msg.payload = [
{ age: 50},
{
projection : {firstname: 1},
limit: 5
}
];
return msg;
In this case, Mongo should return only the firstname
field, for up to a maximum of 5 results.
operation: find.toArray
The function before the mongodb3 node containts:
Anyhow, the result includes all fields and not only the firstName like I wish.