Need to push Data from MongoDB collection to .JSON file using fileSystem -
i have collection in mongodb name "userdata". there 3 records inside it, like:
{"_id":objectid("23456"),"username":"abc","password":"xyz","email":"x@y.com"} {"_id":objectid("12345"),"username":"def","password":"asd","email":"a@b.com"} {"_id":objectid("23212"),"username":"qwe","password":"uiw","email":"c@d.com"}
i want these data pushed data.json file using filesystem. tried efforts of basic json data pushing approach (counting length of data , looping variable , stringify them) failed.
please me out on this.
thanks abhijeet
Comments
Post a Comment