title: Elasticsearch Nested Match Last Value
body: <p>We have article &amp; edited authors as array. Need to check How many article last edited by particular author.</p>
  
  <p><strong><em>Data:</em></strong></p>
  
  <pre><code>{
      "Article" : [
        {
          "id" : 12
          "title" : "An article title",
          "categories" : [1,3,5,7],
          "tag" : ["elasticsearch", "symfony",'Obtao'],
          "author" : [
              {
                  "firstname" : "Francois",
                  "surname": "francoisg",
                  "id" : 18
              },
              {
                  "firstname" : "Gregory",
                  "surname" : "gregquat"
                  "id" : "2"
              }
          ]
        }
      },
      {
          "id" : 13
          "title" : "A second article title",
          "categories" : [1,7],
          "tag" : ["elasticsearch", "symfony",'Obtao'],
          "author" : [
              {
                  "firstname" : "Gregory",
                  "surname" : "gregquat",
                  "id" : "2"
              },
              {
                  "firstname" : "Francois",
                  "surname": "francoisg",
                  "id" : 18
              }
          ]
        }
  }
  </code></pre>
  
  <p><strong><em>Request Data:</em></strong>
      URL: <a href="http://localhost:9200/book/articles/_count/" rel="nofollow noreferrer">http://localhost:9200/book/articles/_count/</a></p>
  
  <pre><code>For example `Gregory` &amp; `Francois` should get one article as count.
  </code></pre>
  
  <p>Please let me know how to compare first object only &amp; get results.</p>