contains
一樣的功能存在play.api.libs.json.Json
檢查的關鍵在play.api.libs.json.Json
val data=Map("id" -> "240190", "password" -> "password","email" -> "[email protected]")
data.contains("email")//true
val info=Json.obj("id" -> "240190", "password" -> "password","email" -> "[email protected]")
現在如何檢查info
包含email
與否?
'keys'產生一個'Set'。 – Kigyo
謝謝,這是一個錯字。 –