title: How to parse JSON file format?
body: <p>Just wondering how to parse this kind of JSON structure:</p>
  
  <pre><code>{
      "vehicles": [
          {
              "key": "1",
              "plate": "BLANKET",
              "assignee_key": "",
              "assignee": {
                  "key": "",
                  "fname": "",
                  "mname": "",
                  "lname": ""
              },
              "year": "",
              "make": "",
              "model": ""
          },
          {
              "key": "2",
              "plate": "BLANKET1",
              "assignee_key": "",
              "assignee": {
                  "key": "",
                  "fname": "",
                  "mname": "",
                  "lname": ""
              },
              "year": "",
              "make": "",
              "model": ""
          }
      ]
  }
  </code></pre>
  
  <p>I use this kind of code to parse it but cant get the plate and other field.</p>
  
  <pre><code>$string = file_get_contents("sample.json");
  $json = json_decode($string,true);
  foreach($json as $res){
      echo $res['plate'].'&lt;br/&gt;';
  }
  </code></pre>
  
  <p>I always getting this error "Notice: Undefined index: plate".</p>