What is the equivalent to PHP\'s array_column()
in jQuery? I need the data inside the array without looping, in the same way as in PHP.
I use this to build an object ~ php like associative array. by selecting the .id of the source array, and build that id as the index of the new array and contains the same content of the old source array.
var categoriesById={};
for(item in cacheObject.Categories){
categoriesById[cacheObject.Categories[item].id]=cacheObject.Categories[item];
}