title: Dealing arrays with hamcrest and rest assured
body: <p>I can't figure out how to create the code using hamcrest to check an array inside array having these properties.</p>
  
  <p>(Imagine this as it has multiple entries with different data)</p>
  
  <pre><code> {
          "mobilenum": "+6519829340",
          "firstname": "Allen",
          "lastname": "Edwards",
          "location": "Singapore"
      }
  </code></pre>
  
  <p>If I use this:</p>
  
  <pre><code> .body("smsentries.mobilenum", contains(equalTo("+6519829340")));
  </code></pre>
  
  <p>it returns that it does exist but how can I put more checks that the object it has found also has the same firstname, lastname and location?</p>
  
  <p>I also think that this is wrong:</p>
  
  <pre><code> .body("smsentries.mobilenum", contains(equalTo("+6519829340")))
        .and()
   .body("smsentries.firstname", contains(equalTo("Allen"));
  </code></pre>
  
  <p>As what I understand here is that it searches the array if the array contains mobilenum equal to what is provided and if the array contains the name "Allen"</p>
  
  <p>What I needed to is to find the array having the mobilenum equal to "+6519829340" and having the firstname equalto "Allen".</p>
  
  <p>Do you guys and gals have any idea how to go about this?</p>