title: AngularJS Parse JSON Array Objects Unexpected token :
body: <p>I've tried searching through StackOverflow regarding this issue but could not find a solution that worked for me. I'm using AngularJS. I have simple controller that calls a http service and reads the response data. In this specific case, I have a JSON output with an objects array I am unable to read.</p>
  
  <p>Here's the JSON output:</p>
  
  <pre><code>{
    "results": [{
      "id": "1",
      "download_url": "",
      "uploader": {
        "id": "114899"
      },
      "uploaded": "1442599380",
      "streaming_url_timeout": 1446092554
    }, {
      "id": "2",
      "download_url": "",
      "uploader": {
        "id": "114899"
      },
      "uploaded": "1442599380",
      "streaming_url_timeout": 1446092554
    }]
  }
  </code></pre>
  
  <p>I'm trying to get access to items in 'results'. This is my Service that retrieves the JSON data:</p>
  
  <pre><code>this.getUData = function() {
    var deferred = $q.defer();
  
    $http.jsonp(API_URL + 'udata')
      .success(function(data) {
        deferred.resolve(data);
      })
      .error(function(data) {
        deferred.reject(data);
      });
  
    return deferred.promise;
  }
  </code></pre>
  
  <p>And then this is how i call this service from my controller:</p>
  
  <pre><code>myservices.getUData().then(function(data) {
     $scope.uitems = data.results;
  });
  </code></pre>
  
  <p>Template:</p>
  
  <pre><code>&lt;div class="item" href="#" ng-repeat="item in uitems"&gt;
    &lt;h2&gt;{{item.id}}&lt;/h2&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>But when I try to access the items in 'results', I get the following error:</p>
  
  <pre><code>Uncaught SyntaxError: Unexpected token : 
  </code></pre>
  
  <p>The line in question for this error is    <code>"results":[</code>  </p>