1
I have an object that comes when selecting a particular button.
The object is coming right.
System.out.println(filter.getJsonObject("cadastro"));
Upshot:
{"id":1,"createdAt":"2017-12-22T14:00:55.86","nome":"teste"}
However, I need to return only the name, not the whole object, as I can do?
I tried to System.out.println(filter.getJsonObject("cadastro").getString("nome"));
but it didn’t work out.
From now on, thank you.
You are using
javax.json
?– Victor Stafusa
What happened when you tried the
getString("nome")
? Build error? Exception?null
? A different string came?– Victor Stafusa