My string: result = order=7781&state=1&value=&add=114GH;
I want to get values:
String order = "7781";
String state = "1";
String value = "";
String add = "114GH";
Please help me to solve this problem! Thanks!
I have done till here, but its not working.
String[] resDetails = result.split("&");
for(String pair : resDetails)
{
String[] entry = pair.split("=");
map.put(entry[0].trim(), entry[1].trim());
}
Its giving error because value
is empty