title: Jquery iterate throw json
body: <p>I have the following json response from server: </p>
  
  <pre><code>  $data=[[
  
      {"left":{"p1":{"x":0,"y":0},"p2":{"x":0,"y":15}},
       "right":{"p1":{"x":15,"y":0},"p2":{"x":15,"y":15}},
       "up":{"p1":{"x":0,"y":0},"p2":{"x":15,"y":0}},
       "bottom":{"p1":{"x":0,"y":15},"p2":{"x":15,"y":15}}},
  
      {"left":{"p1":{"x":0,"y":15},"p2":{"x":0,"y":30}},
       "right":{"p1":{"x":15,"y":15},"p2":{"x":15,"y":30}},
       "up":{"p1":{"x":0,"y":15},"p2":{"x":15,"y":15}},
       "bottom":{"p1":{"x":0,"y":30},"p2":{"x":15,"y":30}}}
  
      ],
  [
  
  {"left":{"p1":{"x":0,"y":0},"p2":{"x":0,"y":15}},
   "right":{"p1":{"x":15,"y":0},"p2":{"x":15,"y":15}},
   "up":{"p1":{"x":0,"y":0},"p2":{"x":15,"y":0}},
   "bottom":{"p1":{"x":0,"y":15},"p2":{"x":15,"y":15}}},
  
  {"left":{"p1":{"x":0,"y":15},"p2":{"x":0,"y":30}},
   "right":{"p1":{"x":15,"y":15},"p2":{"x":15,"y":30}},
   "up":{"p1":{"x":0,"y":15},"p2":{"x":15,"y":15}},
   "bottom":{"p1":{"x":0,"y":30},"p2":{"x":15,"y":30}}}
  
  ]
  ]
  </code></pre>
  
  <p>I would like to alert every x of p1 point in left.</p>
  
  <pre><code>$.getJSON("jetData",
            function(data) {
        $.each(data, function(i,item){
            alert(data[i].left.p1.x);
  
          }); 
        });
  </code></pre>
  
  <p>I'm getting </p>
  
  <pre><code>Uncaught TypeError: Cannot read property 'p1' of undefined 
  </code></pre>
  
  <p>How to do it correct?</p>
  
  <p><strong>Update:</strong></p>
  
  <p>I'm sorry I posted wrong example it just took me some time to realize that we are talking about 2x2 matrix. so I need to print value in 2 loops. </p>