title: How filter a JSLookup/JSObject with the Scala Play library
body: <p>Say I have some params coming from our API clients like this:</p>
  
  <pre><code>val params = (request \ "params")
  </code></pre>
  
  <p>I want to <code>filter</code> them and remove certain key/values. Like if I get:</p>
  
  <pre><code>{
    "foo": "bar",
    "hello": "world"
  }
  </code></pre>
  
  <p>I want to filter it to </p>
  
  <pre><code>{
    "foo": "bar"
  }
  </code></pre>
  
  <p>Here's my WIP code but, as more advanced Scala people will probably tell right away, it doesn't work.</p>
  
  <pre><code>val params = (request \ "params").get.as[List[JsObject]]
  
  val blacklistedParams = Seq("foo")
  
  val approvedParams = params.filter((param: JsObject) =&gt; {
    !blacklistedParams.contains(param)
  })
  </code></pre>
  
  <p>That first line always fails. I've tried doing <code>.get.as</code> in all sorts of types but always get errors. I'm still new to Scala and types in general.</p>