i want to parse json retrieved from url in jsp. Can anyone please help? My url is giving response in json format and now i want to call it in my html page. My url is giving response as
{"status":1,"msg":"List of Rooms","id":["1","2","3"],"name":["php","Java","myroom4"]}
I am not able to understand what is going wrong. please help.
<script type="text/javascript" charset="utf-8">
$.get('http:....', function(data, textStatus) {
alert('Status is '+textStatus);
alert('JSON data string is: '+data);
var myJson = JSON.parse(data);
var myJson = JSON.parse(textStatus);
var myJsonObj = jsonParse(myJson);
alert(myJsonObj.msg);
}, 'text');
</script>
My url is giving response as
{"status":1,"msg":"List of Rooms","id":["1","2","3"],"name":["php","Java","myroom4"]}