title: Map and Flatmap Future[JsValue]
body: <p>Im having an issue to extract string value from a Future[JsValue] </p>
  
  <p>I tried Map and Flatmap but i guess im doing somthing wrong...</p>
  
  <p>I have this method that return <strong>Future[JsValue]</strong></p>
  
  <pre><code> val chunk: Future[JsValue] = BusinessLogic.Methods.getJsonValue(url)
  </code></pre>
  
  <p>If i was map i get a Future[String]</p>
  
  <pre><code> val next: Future[String] = (chunk.map(_.\("paging").\("next").as[String]))
  </code></pre>
  
  <p>If i use flat map i get type mismatch </p>
  
  <pre><code> val next = chunk.flatMap(x=&gt;x.\("paging").\("next").as[String])
  </code></pre>
  
  <p>What will be the correct way to extract the value ??</p>
  
  <p>thanks</p>