title: Can't retrieve data from JSON in Javascript. The json is passed from php
body: <p>I have a problem and i search for a solution, but i can't find it. I have this Json:</p>
  
  <pre><code>[
      {
          "name": "Pippo (74)",
          "price": "1",
          "latitudine": "10.32562",
          "longitudine": "44.8003686"
      },
      {
          "name": "pluto",
          "price": "2",
          "latitudine": "10.32562",
          "longitudine": "44.8003686"
      }
   ]
  </code></pre>
  
  <p>I want retrieve data from the Json (named msg):</p>
  
  <pre><code>num = msg.length;
  document.write (num);
  document.write (msg[0].name);
  </code></pre>
  
  <p>But it don't work! Can you help me?</p>