Hi All,
I've been playing around with executing raw mongodb queries with opensips
2.3.2. Though I can run and execute queries successfully I cannot figure
how to write a query that queries the objectId in mongodb directly.
The raw query basically is:

db.runCommand({ find: "customers", filter: {
"_id":ObjectId("5a212d183f1e5e1c7b11b194") } });

But When i write it in the script as:

cache_raw_query("mongodb:instance1", "{ \"find\": \"customers\",
\"filter\": { \"_id\": ObjectId(\"5a212d183f1e5e1c7b11b194\")
}}","$avp(out)");

opensips gives json parsing error. It basically expects the entire ObjectId
string to be in inverted commas to be a valid json. Any ideas on how to
successfully write the above working query in opensips to pass as a raw
query.

Thanks,

- Jayesh
_______________________________________________
Users mailing list
[email protected]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

Reply via email to