title: How sort an ArrayList of HashMaps holding several key-value pairs each?
body: <p>I need to call an external API with an ArrayList of HashMaps holding several predefined key-value pairs each. An example:</p>
  
  <pre><code>ArrayList&lt;HashMap&lt;String, String&gt;&gt; arrayListHashMap = new ArrayList&lt;HashMap&lt;String, String&gt;&gt;();
  
      {
          HashMap hashMap = new HashMap&lt;String, String&gt;();
          hashMap.put("key", "A key");
          hashMap.put("value", "B value");
          arrayListHashMap.add(hashMap);
      }
  
      {
          HashMap hashMap = new HashMap&lt;String, String&gt;();
          hashMap.put("key", "B key");
          hashMap.put("value", "A value");
          arrayListHashMap.add(hashMap);
      }
  </code></pre>
  
  <p>Now I need to sort this construct on the contents of the "value" key. This sort would result in the "key=B key/value=A value" entry as the first one in the arrayListHashMap.</p>
  
  <p>Any help is highly appreciated.</p>
  
  <p>HJW</p>