I have the following string and I need to split it to get the two objects inside:
[Object{value1="1", value2="2"}, Object{Value1="1", value2="2"}]
I have the following string and I need to split it to get the two objects inside:
[Object{value1="1", value2="2"}, Object{Value1="1", value2="2"}]
You could try:
String[] splitTextObject = YOUR_STRING.split(", ");
String object1 = splitTextObject[0];
String object2 = splitTextObject[1];
...
But I don't think you actually need to split the string this way in order to achieve getting each object, and instead you should consider parsing your JSON. Perhaps utilise GSON.