title: how to retrieve json data in sequence
body: <p>i have simple json results like below</p>
  
  <pre><code>{
    "code": 200,
    "image": "https://example.com/image.jpg",
    "result": [
      {
        "url": "https://example.com/1",
        "label": "MP4"
      },
      {
        "url": "https://example.com/2",
        "label": "FLV"
      },
      {
        "url": "https://example.com/3",
        "label": "MP3"
      },
      {
        "url": "https://example.com/4",
        "label": "AVI"
      },
      {
        "url": "https://example.com/5",
        "label": "WMV"
      }
    ]
  }
  </code></pre>
  
  <p>as you can see, that there are so many different label paths, and sometimes the sequence of labels is not like the above, it's always changing (random), and I'm trying to get the MP3 label part but can not.
  My question is, how to take the sequence of json which has MP3 label?</p>
  
  <p>I have tried with the script below</p>
  
  <pre><code>$uri = json_decode(file_get_contents('https://example.com/json.json'),TRUE);
  echo $uri['result'][2]['url'];
  </code></pre>
  
  <p>but as described above, the position of the MP3 label is always changing, is there a way to overcome it?</p>