how to get an array from variables in object js code example Example: how to get array from object in javascript let result = objArray.map(({ foo }) => foo)