Lets say I have an object array like this
peoples = [{name:"Joe",age:21,sex:'M'},
{name:"Smith",age:18,sex:'M'},{name:"Sally",age:25,sex:'F'}];
Some of these fields are irrelevant so I need to remove attribute age and sex from all of above objects.
This is the desired output.
[{name:"Joe"},{name:"Smith"},{name:"Sally"}];
Update: It would be nice if I can use angularjs inbuilt service like $filter.