title: Update nested array document in mongoDB
body: <p>I have mongo document like </p>
  
  <pre><code>  {
      "_id" : ObjectId("59ad2dbd7549de7c69ef0132"),
      "customerId" : "TELEFONICA",
      "organization" : "TELEFONICA",
      "description" : "",
      "events" : [ 
          {
              "id" : "abandonCartEvent",
              "name" : "Abandoned Cart Event",
              "attributes" : [ 
                  {
                      "attrId" : "geoLocation",
                      "attrName" : "Customer Location",
                      "defaultValue" : "London"
                  }, 
                  {
                      "attrId" : "traits",
                      "attrName" : "Customer Traits",
                      "defaultValue" : "Sports Lover"
                  }
              ]
          }, 
          {
              "id" : "resumeEvent",
              "name" : "Resume Event",
              "attributes" : [ 
                  {
                      "attrId" : "geoLocation",
                      "attrName" : "Customer Location",
                      "defaultValue" : "London"
                  }, 
                  {
                      "attrId" : "traits",
                      "attrName" : "Customer Traits",
                      "defaultValue" : "Sports Lover"
                  }
              ]
          }, 
         {
              "id" : "cancelEvent",
              "name" : "Cancel Event",
              "attributes" : [ 
                  {
                      "attrId" : "geoLocation",
                      "attrName" : "Customer Location",
                      "defaultValue" : "London"
                  }, 
                  {
                      "attrId" : "traits_",
                      "attrName" : "Customer Traits",
                      "defaultValue" : "Sports Lover"
                  }
              ]
          }
      ]
  }
  </code></pre>
  
  <p>Here I want to update "attributes" array, i.e, I need to modify any one object of attributes array.</p>
  
  <p>Can someone provide me solution for updating this nested document</p>