I have following question on Javascript Suppose we have srcArr - array of objects , each defined as following
var srcElement = {id:id_val , prop1:value1, prop2:value2}
I need to get array of id-s of array elements.I.e. array of elements like {id;:id_val} The simplest way is something like this
var arrayLength = srcArr.length;
for (var index=0; index<arrayLength;index++) {
idsArr.push(srcArr[index].id);
}
The question is : Is there more effective way to get ids of array elements?
Thanks in advance

foris fastest