nosql

Using variable field names when running modifier operations on an embedded object in mongodb

When running modifier operations on an embedded object you would often run into situations where in the field name needs to be generated/referenced dynamically when the query runs.

Lets take an example, assume we have a db testing and in that we have a collection testing, in that lets insert some documents like

db.testing.save({key:1,data:{0:1,1:2,2:3}})

using the following commands

Who's online

There are currently 0 users and 2 guests online.

Who's new

  • Saravana Peruma...

Syndicate content