Split the string on ,
, split the pairs on :
:
Map<String, String> theMap = new HashMap<>();
String[] pairs = testString.split(",");
for (String pair : pairs) {
String[] parts = pair.replaceAll("\"", "").split(":");
theMap.put(parts[0], parts[1]);
}
System.out.println(theMap.get("application_id"));
Output:
123456
solved Prase string and save it as key value pair