meteor - Some MongoDB questions -
i'm new mongodb , meteor. have checked official docs seems didn't job. here have couple of questions.
the structure follows.
{ _id:"127467812649871246", "name":"disha", "last_name":"shukla", "members": [ { name:"xyz" }, { name:"abc" } ], "user":"premium" }
1] how insert data in particular field when data exists referring record id ? in case, insert new member in "members"
2] in cases there wont "user":"premium" field. because wont insert @ first time. how check if field exists if have inserted document ?
any appreciated :)
thank you!
the $push command used insert data existing array in mongodb. , $exists used check whether field exists in collection. go links find more.
Comments
Post a Comment