You can also do it using positional operator:
db.coll.update(
{_id:x, arrayOfObjects:{}},
{$set: {“arrayOfObjects.$”:{new:”whatever”}}})
You can also do it using positional operator:
db.coll.update(
{_id:x, arrayOfObjects:{}},
{$set: {“arrayOfObjects.$”:{new:”whatever”}}})