Answers for "javascript map through object keys"

5

javascript iterate object key values

Object.entries(obj).forEach(([key, value]) => {
	console.log(key, value);
});
Posted by: Guest on March-30-2020
0

how to map through object.keys

let newObj = Object.fromEntries(Object.entries(obj).map(([k, v]) => [k, v * v]));
Posted by: Guest on July-23-2021

Code answers related to "javascript map through object keys"

Code answers related to "Javascript"

Browse Popular Code Answers by Language