title: How to get each specific value in an array?
body: <p>I'm looking to be able to extract each 'hire_address' value from the following array and add it to a separate array.</p>
  
  <pre><code>var addr =
  {  
     "status":"success",
     "data":[  
        {  
           "start":"2017-01-26 12:30:00",
           "hire_oucu":"ac2",
           "hire_address":"Glasgow",
           "offer_oucu":"ac1",
           "offer_address":"Glasgow"
        },
        {  
           "start":"2017-01-26 12:30:00",
           "hire_oucu":"ac2",
           "hire_address":"Poole",
           "offer_oucu":"ac1",
           "offer_address":"Poole"
        }
        {  
           "start":"2017-01-26 12:30:00",
           "hire_oucu":"ac2",
           "hire_address":"Hastings",
           "offer_oucu":"ac1",
           "offer_address":"Hastings"
        }
        {  
           "start":"2017-01-26 12:30:00",
           "hire_oucu":"ac2",
           "hire_address":"London",
           "offer_oucu":"ac1",
           "offer_address":"London"
        }
     ]
  };
  </code></pre>
  
  <p>I currently have </p>
  
  <pre><code>var addresses = [];
  $.each(addr.data.hire_address, function (index, value) {
  addresses.push(value);
  </code></pre>
  
  <p>But not having any luck. Any suggestions?</p>
  
  <p>Thank you for the replies.</p>
  
  <p>I now have</p>
  
  <pre><code>var addresses = [];
  $.each(addr, function (index, value) {
      if (value == "data"){
          addresses.push(value.hire_address);
      }
  }
  );
  </code></pre>
  
  <p>But can't seem to get it to work. Do I need the <code>if</code> statement? I added this because the first item is 'status' and was running into errors if I tried to add a 'hire_address' property of this because it doesn't exists.</p>