title: Java/Android - Search ArrayList<HashMap<String, String>> for matching key -> value
body: <p>I have an ArrayList of HashMaps, and I have the key and value of one HashMap that I'd like to use to match the value of another HashMap found at a different position..</p>
  
  <p>For example:</p>
  
  <pre><code>1- [&lt;key1, val1&gt;, &lt;key2, "some value"&gt;, &lt;key3, val3&gt;]
  
  2- [&lt;key1, val1&gt;, &lt;key2, val2&gt;, &lt;key3, val3&gt;]
  
  3- [&lt;key1, "some value"&gt;, &lt;key2, val2&gt;, &lt;key3, val3&gt;]
  </code></pre>
  
  <p>And I know that Array.get(1).get(key2) == "some value"</p>
  
  <p>How can I then use this to match the key1 at Array.position(2), and return the value of key3?</p>
  
  <p>Or in other words, how can I find the position of an ArrayList given the value of one of it's containing key/value HashMaps?</p>
  
  <p>Something like Array.where("key1" == "some value").</p>
  
  <p>Thanks</p>