Delete key-value from object in array, Javascript -
this question has answer here:
- how remove property javascript object? 24 answers
- how remove particular element array in javascript? 52 answers
i have array looks this:
$scope.quotes = [ { 'quote': 'foo', 'author': 'bar', 'source': 'foobar', 'first': 'slideout', }, { ... }, ] i'm trying remove key-value first: slideout array. this:
delete $scope.quotes[0][first]; i tried:
delete $scope.quotes[0].first;
Comments
Post a Comment