title: Jquery get values from json into select
body: <p>I have a json array which looks like this</p>
  
  <pre><code>[{
  "": "Select your State/Region"
  }, {
  "BAL": "Balkh"
  }, {
  "BAM": "Bamian"
  }]
  </code></pre>
  
  <p>I am trying to get the values out of it using jquery, but i can't seem to loop through.</p>
  
  <p>This is what I've tried</p>
  
  <pre><code>var value = $(this).val();
  var url = '{{ route('getstatesjson') }}';
   $.getJSON(url, { state: value }, function(obj) {
      for (var i = 0, len = obj.length; i &lt; len; i++) {
  
      }
   });
  </code></pre>
  
  <p>but i can't seem to pull any of the objects out.  The idea is that i can use the first value as the value and the second value as the text in the select.</p>