title: i want to rename my json key get from api call
body: <p>I have json in this format in my DB.</p>
  
  <pre><code>[  
     {  
        ip.src:"192.168.200.10",
        y:1506
     },
     {  
        ip.src:"192.168.200.10",
        y:1506
     },
     {  
        ip.src:"192.168.200.10",
        y:1506
     },
     {  
        ip.src:"192.168.200.10",
        y:1506
     },
     {  
        ip.src:"192.168.200.10",
        y:1506
     }
  ]
  </code></pre>
  
  <p>I want to change the key name <code>ip.src</code> to <code>name</code>
  for all values using loop</p>
  
  <p>This is my code</p>
  
  <pre><code>$http.get("api/data")
       .then(function(data,status){
           if(data){
               $scope.log=data;
               angular.forEach($scope.log, function(value, key){
                   if(key=="data"){
                       $scope.log.data.ip.src=name;
                   }
           }
      }
  </code></pre>