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.
array_column()
Shorter version of Fabian's answer using arrow notation:
let array = [ { id: 1, name: 'foo' }, { id: 2, name: 'bar' }, ]; let names = array.map( el => el.name );