title: How to update data in mongodb
body: <p>I tried to array inside to update using mongodb but its throwing error how to solve it.</p>
  
  <pre><code>[
      {
          "_id": "5b4efd6fd53be829188070c8",
          "id": 1,
          "name": "All Categories",
          "hasSubCategory": "false",
          "parentId": "0"
      }
  ]
  
  </code></pre>
  
  <p>I tried this way of code  </p>
  
  <p>db_connection.collection('ecomm_prod_db_product').update({_id:product_data[i]['_id']},{$set :{product[i]['name']:"hari}})  </p>
  
  <p>but its throwing error</p>