title: Read a JSON value from request.body in Scala & Play Framework
body: <p>I am sending a JSON data from my angular form into a Play Framework Controller. The Controller receives the messages and when I console print it, it looks like the following:</p>
  
  <pre><code>{"username":"{   \"tID\": 123,   \"cID\": \"TEST\",   \"version\": 1}"}
  </code></pre>
  
  <p>What I am doing so far is: [Note: I am using <code>play.api.libs.json</code>]</p>
  
  <pre><code>def sendMessage = Action(parse.json) {
    request =&gt;
    val message: JsValue = request.body
    val cID = (message \ "cID").get
  }
  </code></pre>
  
  <p>However I am getting an error <code>java.util.NoSuchElementException: None.get
  </code> because its not able to retrieve the cID from the JSON string? How do I get the value for cID without the escape character <code>\</code></p>