title: (AngularJS) how to loop through an Array
body: <p>That is an array on php.i have transformed it in json (with json_encode)</p>
  
  <pre><code>Array
  (
      [codehttp] =&gt; Array
          (
              [0] =&gt; 200
              [1] =&gt; 200
              [2] =&gt; 200
              [3] =&gt; 200
          )
  
      [time] =&gt; Array
          (
              [0] =&gt; 2014-09-15 13:54:04
              [1] =&gt; 2014-09-15 13:54:04
              [2] =&gt; 2014-09-15 13:54:04
              [3] =&gt; 2014-09-15 13:54:04
          )
  
      [channel] =&gt; Array
          (
              [0] =&gt; channel1
              [1] =&gt; channel1
              [2] =&gt; channel1
              [3] =&gt; channel1
              [4] =&gt; channel1
          )
  
      [type] =&gt; Array
          (
              [0] =&gt; android
              [1] =&gt; android
              [2] =&gt; android
              [3] =&gt; android
              [4] =&gt; android
          )
  
      [indice] =&gt; Array
          (
              [0] =&gt; masterplaylist
              [1] =&gt; video_110000
              [2] =&gt; video_190000
              [3] =&gt; video_300000
              [4] =&gt; video_500000
          )
  
      [cdn] =&gt; Array
          (
              [0] =&gt; cdn1
              [1] =&gt; cdn1
              [2] =&gt; cdn1
              [3] =&gt; cdn1
              [4] =&gt; cdn1
          )
  
  )
  </code></pre>
  
  <p>Please I would like to know how to parse (the codehttp field) in javascript the final json variable. I would like to do it into an angularjs controller. </p>
  
  <p>I have tried this code (in a controller) but it does'nt work</p>
  
  <pre><code>$scope.flag_a = 'good';
  
  for(var key in $scope.content.codehttp)
  {
          if($scope.content.codehttp[key] != '200')
          {
                  $scope.flag_a = 'bad';
          }
  }
  </code></pre>