我在mongolab中创建了一个mongodb集合,并希望打印该集合中的所有文档。我有mongolab和mongolab的url,可以连接到该集合,如下:
mongodb://user:1234@xyz.mongolab.com:41248/new
示例文档结构如下:
{
"_id": "9759572745-Sing",
"details": {
"Gender": "M",
"PreTrainingStatus": "Fresher",
"Religion": "Hindu",
"attendanceInPercentage": "",
"batchHolders": {
"AssessmentDate": "Thu Jul 16 2015",
"CourseFee": "7500",
"isEditable": false
},
"batchID": "282726",
"eid": "",
"whereDidYouHearAboutStar": "---Select---",
"skillInstructorOrTrainerName": "282726",
"specificGovtInstitutetieups": "---Select---",
"isSelected": false,
"isEditable": false
},
"addedOnMs": 1439455766000,
"submittedOnMs": 1439454813000,
"latitude": "27.409566879272",
"longitude": "77.69295501709",
"locationName": "Uttar Pradesh 281006,null"
}
我想将它和所有嵌套属性一起打印出来,以列形式显示。 但我无法做到,请帮忙。
谢谢(预先感谢), Dia