title: MongoDB how to remove field inside embedded array?
body: <p>I have a situation where i want to remove a field inside a array of dictionary.</p>
  <p>I know how to remove a normal field:
  { $unset: { : &quot;&quot;} }</p>
  <p>But please help me for below example where i want to remove <strong>status</strong> field inside second dict</p>
  <pre><code>{  
      &quot;recs&quot;:[  
          {  
              &quot;required_1&quot;:&quot;&quot;
              &quot;required_2&quot;:&quot;info&quot;,
              &quot;status&quot;:&quot;completed&quot;,
              &quot;datetime&quot;:&quot;2018-02-02T06:00:04Z&quot;
          },
          {  
              &quot;required_1&quot;:&quot;&quot;
              &quot;required_2&quot;:&quot;info&quot;,
              &quot;status&quot;:&quot;inprogress&quot;
              &quot;datetime&quot;:&quot;2018-02-02T06:00:04Z&quot;         
          }
      ],
      &quot;mainstatus&quot;:&quot;failed&quot;
  }
  </code></pre>