I am trying to insert an object formatted like this:
$scope.newObj = {1: "N/A", 2: "KO", 3: "OK", 4: "OK", 5: "OK", 15: "N/A", 19: "OK"} 
I tried using the following for loop:
var objt = $scope.newObject;
      console.log($scope.newObject[0]) // undefined
for(i=0;i<$scope.newObj.length;i++)
{
   $http.post("insert?etat="+$scope.newObject[0]+"&id="+Object.keys(objt)) 
}
But it doesn't seem to work. I am getting undefined everywhere.  Does anyone have an idea on how to retrieve the data from that object row by row then insert the values to the service? 
 
     
    