Updating a field with a nested array in Elastic Search : <p>I am trying to update a field in a document with an array. I want to add an array to the field "products". I tried this:</p>

<pre><code>POST /index/type/1/_update
{
    "doc" :{
       "products": [
         {
           "name": "A",
           "count": 1
         },
         {
           "name": "B",
           "count": 2
         },
         {
           "name": "c",
           "count": 3
         }
       ]
    }
}
</code></pre>

<p>this is the error response I am getting when I try and run the code:</p>

<pre><code>{
   "error": {
      "root_cause": [
         {
            "type": "mapper_parsing_exception",
            "reason": "failed to parse [products]"
         }
      ],
      "type": "mapper_parsing_exception",
      "reason": "failed to parse [products]",
      "caused_by": {
         "type": "illegal_state_exception",
         "reason": "Can't get text on a START_OBJECT at 1:2073"
      }
   },
   "status": 400
}
</code></pre>

<p>Anyone know what I am doing wrong?</p>
