title: JQuery get data from JSON array
body: <p>This is part of the JSON i get from foursquare. </p>
  
  <p><strong>JSON</strong></p>
  
  <pre><code>tips: {
      count: 2,
      groups: [
      {
          type: "others",
          name: "Tips from others",
          count: 2,
          items: [
          {
              id: "4e53cf1e7d8b8e9188e20f00",
              createdAt: 1314115358,
              text: "najjači fitness centar u gradu",
              canonicalUrl: "https://foursquare.com/item/4e53cf1e7d8b8e9188e20f00",
              likes: {
                  count: 2,
                  groups: [
                  {
                      type: "others",
                      count: 2,
                      items: []
                  }],
                  summary: "2 likes"
              },
              like: false,
              logView: true,
              todo: {
                  count: 0
              },
              user: {
                  id: "12855147",
                  firstName: "Damir",
                  lastName: "P.",
                  gender: "male",
                  photo: {
                      prefix: "https://irs1.4sqi.net/img/user/",
                      suffix: "/AYJWDN42LMGGD2QE.jpg"
                  }
              }
          },
          {
              id: "4e549e39152098912f227203",
              createdAt: 1314168377,
              text: "ajd da vidimo hocu li znati ponoviti",
              canonicalUrl: "https://foursquare.com/item/4e549e39152098912f227203",
              likes: {
                  count: 0,
                  groups: []
              },
              like: false,
              logView: true,
              todo: {
                  count: 0
              },
              user: {
                  id: "12855147",
                  firstName: "Damir",
                  lastName: "P.",
                  gender: "male",
                  photo: {
                      prefix: "https://irs1.4sqi.net/img/user/",
                      suffix: "/AYJWDN42LMGGD2QE.jpg"
                  }
              }
          }]
      }]
  }
  </code></pre>
  
  <p>I need to get the last tip <strong>text</strong> , the <strong>user</strong> who wrote it and the <strong>date</strong> when he wrote/post it. </p>
  
  <p><em>User</em>: Damir P.</p>
  
  <p><em>Date</em> : 1314115358</p>
  
  <p><em>Text</em>: najjači fitness centar u gradu</p>
  
  <p>I tried with <strong>JQuery</strong> and this works to fetch a non-array value:</p>
  
  <pre><code>$.getJSON(url, function(data){
      var text= data.response.venue.tips.groups.items.text;
      alert(text);
  });
  </code></pre>
  
  <p>But it doesn't work with arrays.</p>
  
  <p><strong>Result</strong> : Uncaught TypeError: Cannot read property 'text' of undefined.</p>
  
  <p>Also I tried with <strong>$.each</strong>, but with no effect.</p>
  
  <pre><code>$.getJSON(url, function(data){
      $.each(data.response.venue.tips.groups.items.text, function (index, value) {
          console.log(value);
      });
  });
  </code></pre>
  
  <p>What am I doing wrong ? </p>