title: Angulajs - how to extract certain data from json
body: <p>I have this json example where I need to get data individually.</p>
  
  <p>json:</p>
  
  <pre><code>[
      {
          "web": "63",
          "mobile": "2525",
  
      },
      {
          "web": "70",
          "mobile": "1886",
  
      },
      {
          "web": "65",
          "mobile": "1044",
  
      }
  ]
  </code></pre>
  
  <p>then in the controller:</p>
  
  <pre><code>myData.get ().then (function (data) {
              $scope.data = data;//this is fine
              console.log(data);
              $scope.web = data.web//this does not work
              $scope.mobile = data.mobile//this does not work
              console.log($scope.data.web);//this does not work
              console.log($scope.web);//this does not work
  
              //and then lets say I want to pass them in the url
              var myUrl = "www.myurl.com/"+$scope.web+$scope.mobile;
        });
  </code></pre>
  
  <p>so basically I need to be able to work with individual data within the json file, so I can pass them them anywhere within the applications logic. What am I doing wrong?</p>
  
  <p>heres plunker: <a href="http://plnkr.co/edit/Dre5j8yLDoJek89KCmak?p=preview" rel="nofollow">http://plnkr.co/edit/Dre5j8yLDoJek89KCmak?p=preview</a></p>
  
  <p>Many thanks for your help</p>