title: How can I use JSON file in laravel blade.php
body: <p>I have a json file like this below:</p>
  <pre><code>[
   {
     &quot;Region&quot;: &quot;Naypyitaw Union Territory&quot;,
     &quot;Town &quot;: &quot;Za Bu Thi Ri Township&quot;,
     &quot;Quarter &quot;: &quot;Zay Ya Theik Di Quarter&quot;,
     &quot;Postal Code&quot;: 1501001
  },
   {
     &quot;Region&quot;: &quot;Naypyitaw Union Territory&quot;,
     &quot;Town &quot;: &quot;Za Bu Thi Ri Township&quot;,
     &quot;Quarter &quot;: &quot;Pyin Nyar Theik Di Quarter&quot;,
     &quot;Postal Code&quot;: 1501002
  }]
  </code></pre>
  <p>In my controller, I passed the file like this below:</p>
  <pre><code>public function create()
  
      {
          $jsonString = file_get_contents(base_path('resources/data/address.json'));
          $details = json_decode($jsonString, true);
                 
          
          return view('users.create')-&gt;with('details', $details);
      }
  </code></pre>
  <p>In my create.blade.php file I want to show the dropdown menus as Region, Town, and Quarter and Postal Code based on the user choice. For eg. If the user choose Region as &quot;Naypyitaw Union Territory&quot;, then the user should able to Town associated in that region.
  But I do not know how to loop through it.</p>
  <pre><code>&lt;select name=&quot;region&quot; id=&quot;&quot;&gt;
  foreach
     &lt;option value=&quot;&quot;&gt;{{$details-&gt;Region}}&lt;/option&gt;
  endforeach
  &lt;/select&gt;
  </code></pre>