Skip to main content
AI Assist is now on Stack Overflow. Start a chat to get instant answers from across the network. Sign up to save and share your chats.
11 events
when toggle format what by license comment
Oct 27, 2022 at 3:16 vote accept Shibbir
Oct 27, 2022 at 3:13 comment added jsN00b The definition of obj in the question indicates that obj is an Array (the naming seems to be counter-intuitive to the value). So, please try: console.log(...obj?.flatMap(ob => Object.entries(ob)?.map(([k, v]) => `${k} = ${v}`)));
Oct 27, 2022 at 3:10 answer added flyingfox timeline score: 1
Oct 27, 2022 at 3:10 answer added The KNVB timeline score: 0
Oct 27, 2022 at 3:08 comment added d4nyll Well, in Object.keys( obj ), obj is not an object, but an array.
Oct 27, 2022 at 3:07 comment added Shibbir @bbbbbbbboat I have updated.
Oct 27, 2022 at 3:07 history edited Shibbir CC BY-SA 4.0
added 171 characters in body
Oct 27, 2022 at 3:05 comment added bbbbbbbboat What's your expected output?
Oct 27, 2022 at 3:04 answer added Amila Senadheera timeline score: 1
Oct 27, 2022 at 3:02 comment added k.tten It's just obj.forEach(...).
Oct 27, 2022 at 3:00 history asked Shibbir CC BY-SA 4.0