Output
astrotars opened this issue · 3 comments
Can you provide a couple examples on outputting data? I simply want to output data in as JSON -- in the same form as it's stored. Aside from the small blurb at the bottom of the read me, I cannot find any documentation as to how this should be done. Any direction would be greatly appreciated.
You can get all the data out with findAll and then use PHP's json_encode to get JSON.
I figured that would be the case. However, the JSON encoded value returns
an empty object. e.g. http://cl.ly/image/0I1C3L2E0u3z
I know that the query is working, because if I do a print_r on the raw
data, I can see that there is a mongo object. e.g. http://cl.ly/image/061D0p0j3A2K
My code is as simple as http://cl.ly/image/0S3M281f3Z0L
Any thoughts?
Try using getAttributes on each record before passing to json_encode.