title: Parse JSON from URL in Javascript
body: <p>I want to parse json retrieved from url in jsp. My url is giving response in json format and now i want to call it in my html page.</p>
  
  <p>My url is giving response as</p>
  
  <pre><code>{"status":1,"msg":"List of Rooms","id":["1","2","3"],"name":["php","Java","myroom4"]}
  </code></pre>
  
  <p>I am not able to understand what is going wrong.</p>
  
  <pre><code>&lt;script type="text/javascript" charset="utf-8"&gt;
  
      $.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');
  
  &lt;/script&gt;
  </code></pre>
  
  <p>My url is giving response as</p>
  
  <pre><code>{"status":1,"msg":"List of Rooms","id":["1","2","3"],"name":["php","Java","myroom4"]}
  </code></pre>