title: Search the values in Arraylist of HashMap
body: <p>I am trying to search, track name from arraylist of hashmap. I have searched lots of sites on this, but couldn't get any solution.</p>
  
  <p>Here is the code for creating Arraylist of hash maps:</p>
  
  <pre><code> ArrayList&lt;HashMap&lt;String, String&gt;&gt; songsList = new ArrayList&lt;HashMap&lt;String, String&gt;&gt;();
   searchText = (EditText) findViewById(R.id.searchText);
  
    //Count from the server
    int count = dataCount();
  
    for (int i = 0; i &lt; dataCount; i++) 
      {
          HashMap&lt;String, String&gt; map = new HashMap&lt;String, String&gt;();
  
          // adding data to HashMap key =&gt; value
          map.put(KEY_ID, trackNumber);
          map.put(KEY_TITLE, trackTitle);
          map.put(KEY_ARTIST, trackArtist);
          map.put(KEY_DURATION, trackDuration);
          map.put(KEY_THUMB_URL, trackAlbumArt);
  
          // adding HashList to ArrayList
          songsList.add(map);
  
      }
  
      adapter=new LazyAdapter(this, songsList);        
      list.setAdapter(adapter);
  </code></pre>
  
  <p>On TextChanged I am trying to get the search results and update the adapter with new results.</p>
  
  <p>I was trying out similar logic that was given in </p>
  
  <p><a href="https://stackoverflow.com/questions/20381968/hashmap-searching-for-a-specific-value-in-multiple-keys">HashMap Searching For A Specific Value in Multiple Keys</a></p>
  
  <p><a href="https://stackoverflow.com/questions/19951854/is-it-there-a-better-way-to-search-hashmap-from-arraylist">Is it there a better way to Search HashMap from ArrayList</a></p>
  
  <p>But couldn't get any results. </p>
  
  <p>Thanks!</p>