mongodb-compass

Unexpected end of JSON input with MongoDB Compass

独自空忆成欢 提交于 2019-12-24 11:28:29
问题 I exported my local MongoDB Collections using the JSON file type on my pc. Then I wanted to import these Collections on my root server using MongoDB Compass. Everytime when I try to export the Collection, it throws the following error: That's how my JSON file looks like: {..."settings":{"inventory":{"crate":{"$numberInt":"0"},"cratekey":{"$numberInt":"0"},"pickaxe":{"$numberInt":"0"},...} (I don't know if it's relevant to answer this question but this JSON line is just 1/142000) How can I fix

Mongodb $lookup with nested document

六月ゝ 毕业季﹏ 提交于 2019-12-11 09:07:20
问题 I am trying to create a join using mongo's lookup. I have these three collections. orderTracking { _id: ObejctId("59fb7815b3b8429f4750b0df"), itemName : "Hamam Soap", TrackLocation: [{locationId: 1, at:"2017-10-11"}, {locationId: 2,at:"2017-10-13"}], userId : 12, price: 20 } locationType { _id: ObejctId("59b2111345cb72345a35fefd"), locationId : 1 productTypeName: "Warehouse" },{ _id: ObejctId("59af8ce445cb72345a35feea"), locationId : 2 productTypeName: "On Transit" } User { _id: ObejctId(