Parsing JSON to a Map and Set structure How do I make these line of codes more scala-ish (shorter?). I still get the Java feeling in it (which I want to stay away from).

import scala.collection.mutable
val outstandingUserIds: mutable.LinkedHashSet[String] = mutable.LinkedHashSet[String]()    

val tweetJson = JacksMapper.readValue[Map[String, AnyRef]](body)     
val userObj = tweetJson.get("user")    
tweetJson.get("user").foreach(userObj =&gt; {
  userObj.asInstanceOf[Map[String, AnyRef]].get("id_str").foreach(idStrObj =&gt; {
    if (outstandingUserIds.exists(outstandingIdStr =&gt; outstandingIdStr.equals(idStrObj))) {
      outstandingUserIds.remove(idStrObj.asInstanceOf[String])
    }
  })
})
If you really want to inflict this JSON library on yourself, your code could be simplified to:

import scala.collection.mutable

val outstandingUserIds = mutable.LinkedHashSet[String]()    

val tweetJson = JacksMapper.readValue[Map[String, AnyRef]](body)     
for {
  userObj &lt;- tweetJson.get("user")
  idStrObj &lt;- userObj.asInstanceOf[Map[String, AnyRef]].get("id_str")
} outstandingUserIds -= idStrObj.asInstanceOf[String]


But I would recommend you use a better JSON library. For example, using the library that comes with the Play! framework:

(body \ "user" \ "id_str").asOpt[String].foreach {id =&gt;
  outstandingUserIds -= id
}