Let's say I have a collection of items structured like this:
var itemList = [
{ date: '22/9/2016', status: 1, id: '11111' },
{ date: '23/9/2016', status: 1, id: '22222' },
{ date: '24/9/2016', status: 1, id: '33333' }
];
My goal is to generate a list consisting of the IDs from all the elements in the above array, resulting in:
var idList = ['11111', '22222', '33333'];
One option would be to manually loop through the itemList and construct the idList. However, I'm curious if there is another way to accomplish this using native JS, angularJS, or a different library.
Although iterating over the list manually isn't too burdensome, I want to make sure I'm not overlooking any built-in functionality in JS / angularJS that could automate this task for me.