Quantcast
Channel: Iterate through object properties - Stack Overflow
Viewing all articles
Browse latest Browse all 35

Answer by Philll_t for Iterate through object properties

$
0
0
let obj = {"a": 3, "b": 2, "6": "a"}

Object.keys(obj).map((item) => {console.log("item", obj[item])})

// a
// 3
// 2

Viewing all articles
Browse latest Browse all 35

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>