title: How can we update the value of a array field/add a field in nested array in mongodb with a custom value
body: <p>In the following JSON, I want to add a column in the &quot;questionResponse&quot; array say &quot;isactive&quot; after &quot;question&quot; field and assigne value to it,how can it be done?</p>
  <pre><code>{
      &quot;_id&quot; : NumberLong(253),
      &quot;userId&quot; : NumberLong(1220),
      &quot;languageId&quot; : NumberLong(1),
     &quot;questionResponse&quot; : [ 
          {
              &quot;_id&quot; : NumberLong(27),
              &quot;title&quot; : &quot;I do not have access to the support services&quot;,
              &quot;description&quot; : &quot;I do not have access to the support services.&quot;,
              &quot;question&quot; : &quot;I do not have access to the support services.&quot;,
                        &quot;response&quot; : {
                  &quot;value&quot; : [ 
                      &quot;2&quot;
                  ]
              },
              &quot;responseExtension&quot; : {
                  &quot;comments&quot; : &quot;&quot;,
                  &quot;reviews&quot; : &quot;&quot;,
                             }
          }
      ],
      &quot;locationDetails&quot; : {},
         &quot;isActive&quot; : true
  }
  </code></pre>