title: how to get the min and max value from json in angular js
body: <p>i want to get the maximum and minimum value from a json in angular js 
  my json:</p>
  
  <pre><code>{
  
  "data":[
  
          {
           "name": "ranjith",
           "age": 22
          },
          {
           "name": "rahul",
           "age": 20
          },
          {
           "name": "jinesh",
           "age": 25
          },
          {
           "name": "vishnu",
           "age": 24
          }
  
         ]
  
  }
  </code></pre>
  
  <p>and my controller:-</p>
  
  <pre><code>var app = angular.module('myApp', ['']);
  app.controller('myCtrl', function($scope, data) {
  
  $scope.data = data.data;
  $scope.min="";
  $scope.max="";
  
  };
  });
  </code></pre>
  
  <p>i want to get the minimum and maximum value from the array and store it in the Variables min and max</p>