Categories
JavaScript Answers

How to transform object to array with JavaScript Lodash?

Spread the love

To transform object to array with JavaScript Lodash, we call the values method.

For instance, we write

const arr = _.values(obj);

to call values with obj to return an array with the property values in the obj object.

By John Au-Yeung

Web developer specializing in React, Vue, and front end development.

Leave a Reply

Your email address will not be published.