title: How do I deserialize a JSON array using the Play API
body: <p>I have a string that is a Json array of two objects.</p>
  
  <pre><code>&gt; val ss = """[ {"key1" :"value1"}, {"key2":"value2"}]"""
  </code></pre>
  
  <p>I want to use the Play Json libraries to deserialize it and create a map from the key values to the objects.</p>
  
  <pre><code>def deserializeJsonArray(ss:String):Map[String, JsValue] = ???
  // Returns Map("value1" -&gt; {"key1" :"value1"}, "value2" -&gt; {"key2" :"value2"})
  </code></pre>
  
  <p>How do I write the <code>deserializeJsonArray</code> function? This seems like it should be easy, but I can't figure it out from either the Play documentation or the REPL.</p>