Inset a new field in an array of sub-document <p>I have the following schema:</p> <pre><code>{ "name" : "MyName", "actions" : [{ "kind" : "kind1", "result" : "result1" }, { "kind":"kind1", "result":"result1" } ] } </code></pre> <p>I want to insert a new field called 'expected' in different subdocument in actions. I tried the following command but I have an issue with it:</p> <pre><code>db.tasks.update({},{$push:{ "actions.expected" : "MyExpected" }},false,true) can't append to array using string field name expected </code></pre>