Details
-
Question
-
Resolution: Done
-
Major - P3
-
None
-
None
-
None
-
None
Description
Suppose our document looks like this
{
|
a:1, |
b:[
|
{c:120,d:100}, |
{c:121,d:110} |
]
|
}
|
Now how could I upsert new objects in this array? Suppose I want to perform update on the above document and add {c:200,d:120} to b so my expected result looks like this
{
|
a:1, |
b:[
|
{c:120,d:100}, |
{c:121,d:110}, |
{c:200,d:120} |
]
|
}
|
Also the update will of $inc, meaning suppose I want to increment d by 200 if c is present(lets say c is 200 and it is already present in the above document), if not present then I want to upsert the document itself.