Closed raisch closed 6 years ago
Could you provide an example of your query? ie. what request are you running against it?
I just don't know how to add fields parameters to query in url.
query={"name" : "bob"}, {"name" : 1, "age" : "1"}
then encode it.
But this string will cause exception, do you know how to solve this?
I have the same issue now (2014), and got here googling... any news?
Thanks
@raisch @alopezo You can query in the following way: ?fields={"bar":1}
Due to an attempt at line 47 of mongodb/lib/mongodb/commands/query_command.js to treat the string value you pass from req.params.options['fields'] as an object.
Issue can be fixed by changing lines 27-33 of your /lib/rest.js from:
to
and adding the following function: