title: ElasticSearch.Net - Update array with multiple components
body: <p>I've got data indexed using ElasticSearch, and I'm having trouble updating a particular field. A snippet of the JSON is as follows:</p>
  
  <pre><code> {
   "_index": "indexName",
   "_type": "type",
   "_id": "00001",
   "colors": [
       "red",
       "green"
   ]
   "place": "london",
   "person": [
        {
             "name": "john",
             "age": "27",
             "eyes": "blue"
        }
        {
             "name": "mary",
             "age": "19",
             "eyes": "green"
        }
  
   ]
   }
  </code></pre>
  
  <p>I need to add in a new <code>person</code> object, something like:</p>
  
  <pre><code>{
      "name": "jane",
      "age": "30",
      "eyes": "grey"
  }
  </code></pre>
  
  <p>I've got <code>People</code> defined as follows:</p>
  
  <pre><code>public class People
  {
      public List&lt;string&gt; colors {get; set; }
      public string place {get; set; }
      public List&lt;Person&gt; person {get; set; }
  }
  public class Person
  {
      public string name {get; set; }
      public string age {get; set; }
      public string eyes {get; set; }
  }
  </code></pre>
  
  <p>I updated <code>color</code> with no problems by doing:</p>
  
  <pre><code>client.Update&lt;People&gt;(u =&gt; u
      .Id(u.Id)
      .Index(u.Index)
      .Type(u.Type)
      .Script("if ctx._source.containsKey(\"color\")) { ctx._source.color += color; } else { ctx._source.color = [color] }")
      .Params(p =&gt; p
          .Add("color", "pink"))
  );
  </code></pre>
  
  <p>I can't figure out how to update the <code>person</code> field though, as it's a list of <code>Person</code> objects rather than a list of strings.</p>
  
  <p>Any help is greatly appreciated!</p>