Say I had
var people =[{name:"Jim", address:{number:"21",street:"park lane"}},
{name:"Karen",address:{number:"35", street:"oxford drive"}},
{name:"Bob",address:{number:65, street:"main avenue"}}]
and I wanted to get an array of just the address objects, is there a shorthand way?
I know I could just iterate over the people array and push the addresses onto a new array, but I imagine there must be an easier way.