title: AngularJS creating new $scope that subtracts two $scopes consumed from a JSON array
body: <p>I am very very new to AngularJS and programming and I am sure this is a basic question but I am having a difficult time finding our resources in how to achieve subtracting two $scope values consumed from a JSON file ($scope.carrierDiff).  I would appreciate any help you can provide.  </p>
  
  <pre><code>&lt;!doctype html&gt;
  &lt;html ng-app="MyApp"&gt;
  &lt;head&gt;
  &lt;meta charset="utf-8"&gt;
  &lt;title&gt;Untitled Document&lt;/title&gt;
  &lt;script src="Scripts/angular.min.js"&gt;&lt;/script&gt;
  &lt;/head&gt;
  &lt;body &gt;
      &lt;div ng-controller="SiteCtrl"&gt;
          &lt;ul ng-repeat="site in sites"&gt;
              &lt;li&gt;{{site.ID}}&lt;/li&gt;
              &lt;li&gt;{{carrierDiff}}&lt;/li&gt;
         &lt;/ul&gt;
      &lt;/div&gt;&lt;/body&gt;
  &lt;script&gt;
      var app = angular.module("MyApp", []);
          app.controller("SiteCtrl", function($scope, $http) {
              $http.get('JSON/getsamplesitesCopy.json').
              success(function(data, status, headers, config) {   
                  $scope.sites = data;
              $scope.carrierDiff = $scope.sites.Carrier - $scope.sites.Carrier2;
  }).
  error(function(data, status, headers, config) {
  // log error
  });
  });
  &lt;/script&gt;
  &lt;/html&gt;
  </code></pre>