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

Popular posts from this blog

Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12:test (default-test) on project.Error occurred in starting fork -

windows - Debug iNetMgr.exe unhandle exception System.Management.Automation.CmdletInvocationException -

configurationsection - activeMq-5.13.3 setup configurations for wildfly 10.0.0 -