Can someone assist me with fetching data from my data.json file using the unique ID? I have provided an overview of my code below.
$scope.editProfileData=function(){
var editid={'id':2};
$http({
method: 'POST',
url: 'profile.json',
data:editid
}).then(function successCallback(response){
},function errorCallback(response) {
});
}
I am looking for a solution where, when the condition (ID==2
) is met in the JSON file, it will retrieve that specific data. Any help would be greatly appreciated!