How Do I Create a JSON Feed from a MongoDB Collection

Smallyaloge

New Member
I'm creating a CMS for my client to work with his photographs and to sell them on his site. For the CMS end as well as the front end, which both will be all AJAX, it'd be nice to get a JSON feed setup so that I can just use the same feed to generate new "pages" and "views" with JS.So this example feed would have like {[name:'A Photo',description:'lorem ipsum...'],[...]} and then with jQuery or JS i can create a table of all his photographs, pages, etc. How can I set this up for myself?Should I just create a PHP file that gets all the data from the MongoDB put's it in an array than convert the array to JSON?
 
Back
Top