I have a JSON file in my server and an angularJS code that reads it like this:
$http.get('route/to/json/file.json').success(function(data) {
$scope.watchesdata = data;
var tmpList = [];
for (var i = 0; i <= limit; i++){
tmpList.push({
Time: $scope.watchesdata[i].balance,
Company : $scope.watchesdata[i].company,
Matter: $scope.watchesdata[i].address
});
}
$scope.list = tmpList;
});
After some more code that is not important, I update an specific 'Time' value and i want the JSON file on my server to update its information too, something like :
"If company==something and matter==something then oldTime = newTime"
I've just found how to add data at the end of a JSON, but i need to look for a specific entry and modify just one field.