title: How to extract value from json in scala
body: <p>I have this elasticsearch SearchResponse in json format and I want to extract the value to a float object in scala</p>
  
  <pre><code>response: org.elasticsearch.action.search.SearchResponse = {
    "took" : 3,
    "timed_out" : false,
    "_shards" : {
      "total" : 5,
      "successful" : 5,
      "failed" : 0
    },
    "hits" : {
      "total" : 819,
      "max_score" : 0.0,
      "hits" : [ ]
    },
    "aggregations" : {
      "food_bowl" : {
        "value" : 6358.6576502407115
      }
    }
  }
  </code></pre>
  
  <p>This is what I did but don't seem to get it right.</p>
  
  <pre><code>val getJson = parse(SearchResponse)
    val getElement = getJson
    for (myValue &lt;- getElement) {
      val ValueResult = myValue.extract("value")
  </code></pre>