java - Refining the parsed json data -


a part of json recieved - "value":["14.1\""] . on using command - string = string.valueof(o.get("value")); i'm able extract whatever's in value field comes along square brackets, double quotes , slash in between. how retrieve data without square brackets, slash , double quotes?

are sure json in format? value jsonarray

jsonobject object = new jsonobject(s); jsonarray valuearr = object.getjsonarray("value"); string result =string.valueof(valuearr.get(0)); //you'll :  14.1"  result = result.replace("\"","") // final: 14.1 

Comments

Popular posts from this blog

python - mat is not a numerical tuple : openCV error -

c# - MSAA finds controls UI Automation doesn't -

wordpress - .htaccess: RewriteRule: bad flag delimiters -