title: Javascript For each json
body: <p>I'm making a call via ajax javascript to a page (ASP) that returns a json
  with which I would then go to a select value</p>
  
  <p>the json that I returned is of this type</p>
  
  <pre><code>{
    "options": {
      "1": "All locations", 
      "2": "Egypt", 
      "3": "El Alamein", 
      "4": "Marsa matrouh", 
      "5": "Sharm el sheikh "
    }
  }
  </code></pre>
  
  <p>or</p>
  
  <pre><code>{
    "options": {
      "1": "All locations", 
      "2": "Abu dhabi", 
      "3": "Dubai"
    }
  }
  </code></pre>
  
  <p>I don't know the length and the elements that are contained
  then I would make a loop that allows me to extract the values which then will insert the value and label</p>
  
  <p>I'm looking at the net but the examples shown are always with the field name to be recalled that I could not learn about not knowing the length</p>
  
  <p>could someone kindly show me how this cycling json</p>