DEV Community

Discussion on: Mapping on the javascript objects

Collapse
 
tlowrimore profile image
Tim Lowrimore

You can also use Object.entries to avoid the lookup on obj. So, to map over an object, you have this:

Object.entries(obj).map(([key, value]) => (
    `${key} = ${value}`;
));
Collapse
 
iamsamar profile image
IamSamar

ok thanks !!!