I currently have the following JSON:
{"content":
[{"uuid":"123132",
"firstname" : "Jon",
"lastname" : "Deer"
...
}
]
}
What I am trying to do is use Java to get the string value of "uuid". The following is my code:
JSONPATH jsonPath = new JSONPATH(json);
String myString = jsonPath.getString("content.uuid");
System.out.println(myString);
The resulting string: [123132] The expected string: 123132
Is there another way to get the expected result using JSONPATH without using substring (removing the first and last characters of the string) since it is a bit more messy to look at the code?