Answers for "how to create a schema mongodb with an object is array"

-1

how to create a schema mongodb with an object is array

db.update({'Searching criteria goes here'},
{
 $push : {
    trk :  {
             "lat": 50.3293714,
             "lng": 6.9389939
           } //inserted data is the object to be inserted 
  }
});
Posted by: Guest on June-19-2021

Browse Popular Code Answers by Language