Javier-
Wednesday, March 5, 2014, 8:19:14 AM, you wrote:
> After strugling and finally understand with help from friends at
> Stackoverflow, how the find() command works in the interative javascript
> shell of MongoDB, now I know that find() returns a cursor.
> But still have some problems trying to get JSON from my local MongoDB.
You need to put quotes around the code to be evaluated if you're going
to try that from a command line. Try this (condensed into separate
lines to prevent email wraparound):
on mouseUp pMouseBtnNo
local dbText
put "var c=db.test.find();" into dbText
put " while(c.hasNext())" after dbText
put " printjson(c.next())" after dbText
put shell("mongo --eval" && quote & dbText & quote) into field "A"
end mouseUp
--
-Mark Wieder
[email protected]
This communication may be unlawfully collected and stored by the National
Security Agency (NSA) in secret. The parties to this email do not
consent to the retrieving or storing of this communication and any
related metadata, as well as printing, copying, re-transmitting,
disseminating, or otherwise using it. If you believe you have received
this communication in error, please delete it immediately.
_______________________________________________
use-livecode mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode