In a document I have an object called farms
and inside this object I would like to update key-value pairs in the following mannner. How would I do this?
$set:{"farms[${farm._id}]":{name:"a-farm", size:100}
the result would look like this(assuming farm._id = 12345
)
farms:{"12345": {name"a-farm", size: 100}}