title: JSON Decode - returning undefined index
body: <p>Am trying to get more familiar with JSON decoding, so here's what I got:</p>
  
  <pre><code>$json = '{"id":[{"tier": "SILVER"}]}';
  $array = json_decode($json, true);
  var_dump($array["id"]['tier']); 
  </code></pre>
  
  <p>I am trying to fetch the 'tier', but it's resulting the following error: <code>Notice: Undefined index: tier</code> </p>
  
  <p>I have tried certain things such as <code>var_dump($array['tier']);</code>, <code>var_dump($array[0]['tier']);</code> but nothing seems to work and I can not find a lot of information about this.</p>
  
  <p>After the <code>Notice</code>it also returns <code>NULL</code>. Any help is appreciated. </p>