title: Accessing a nested JSON key without looping
body: <p>I have a JSON string like the one given below which is stored in <code>$json</code>. I want to access the first <code>category_id</code> without using a loop. How can I access it?</p>
  
  <pre><code>$json = '{"outfits": [{"1": [{"category_id": "women_jeans", "product_id": 464540467}, {"category_id": "women_tops", "product_id": 487351815}, {"category_id": "women_coats", "product_id": 493322686}, {"category_id": "women_bags", "product_id": 483902882}, {"category_id": "women_shoes", "product_id": 492772225}]}]}';
  $outfits = json_decode($json);
  </code></pre>