Please note that this is not a json object :) My string is:
{"message":"***error in SAP module:-1***","status":400}
This is not a json object, this is a pure string. I cannot turn it into a json object due to technical limitations.
So, I want to take only the bold string (all the value of "message"). I thought about lastIndexOf, and pick the string between ":" and "," But I got messed up with the escape characters for the quotes. How can I achieve it with lastIndexOf? Or in another better way?