Hi I have a Angular data as follows,
{"category":"B","check_histories":[{"date_created":"2015-10-07T10:35:38","field_name":"category","new_value":"B","old_value":null,"resource_uri":"","type":1,"username":"e1007476"},{"date_created":"2015-10-07T10:35:39","field_name":"check_name","new_value":"222","old_value":null,"resource_uri":"","type":1,"username":"e1007476"},{"date_created":"2015-10-07T10:37:25","field_name":"check_name","new_value":"22233","old_value":"222","resource_uri":"","type":0,"username":"e1007476"}],"check_name":"22233","date_created":"2015-10-07T10:35:38","date_modified":"2015-10-07T10:37:25","id":134,"is_valid":true,"resource_uri":""}
How to remove all the data EXCEPT check_histories from the data, when I click a remove button. I have tried
$scope.clear = function(index) {
$scope.final_data.checks.splice(index, 1);
};
But it deleted the entire data, instead of the desired part. Am quite new to AngualrJS. Please help me on it. Thanks in advance.