title: PHP: Nested json and value extraction
body: <p>I have this json below. I'm trying to get values using json_decode. I'm getting some of the values, but I'm having trouble with the deeply nested values. Here is the json:</p>
  
  <pre><code>{
  "startAt": 0,
  "issue": [
  {
      "id": "51526",
      "fields": {
          "people": [
              {
                  "name": "bob",
                  "emailAddress": "bob@gmail.com",
                  "displayName": "Bob Smith",
              },
              {
                  "name": "john",
                  "emailAddress": "john@gmail.com",
                  "displayName": "John Smith",
              }
          ],
          "skill": {
              "name": "artist",
              "id": "1"
          }
      }
  },
  {
      "id": "2005",
      "fields": {
          "people": [
              {
                  "name": "jake",
                  "emailAddress": "jake@gmail.com",
                  "displayName": "Jake Smith",
              },
              {
                  "name": "frank",
                  "emailAddress": "frank@gmail.com",
                  "displayName": "Frank Smith",
              }
          ],
          "skill": {
              "name": "writer",
              "id": "2"
          }
      }
  }
  ]
  
  }
  </code></pre>
  
  <p>I know I can get one value by doing this:</p>
  
  <pre><code>foreach ($decoded_array['issue'][0]['fields']['people'] as $person) {
    echo $person['emailAddress'];
  }
  </code></pre>
  
  <p>However, is there a simplistic way to get all the "emailAddresses" for bob,john,jake, and frank?</p>
  
  <p>Thanks!</p>