What's the best way to map over an Object/Array in JavaScript (ES6)?
Sometimes I need to map both objects properties and arrays. Since Array.map
supports only arrays, I end up using lodash/map
(Lodash supports both objects and arrays).
What's the recommended way to handle this?