DEV Community

Discussion on: SQL GROUP BY using JavaScript

Collapse
 
ribizlim profile image
Mark Magyarodi

Hi, cool article. One point I don't get: why do you need flatMap for key generation (map would be sufficient, flatMap does anyway just one level)? JSON.stringify handles deep array values anyway.

Collapse
 
ketoaustin profile image
Hannah (she/her)

Thanks for reading, Mark! You have a good point. It only needs a map, so I changed it. :)