Is there a way to convert specific key values of an object into a comma-separated string? I have been able to do this with arrays, but my current challenge is that my data is an array of objects. I want to convert each 'id' value into an array of strings as shown in the example below.
#current code - just initial idea
console.log(['a', 'b', 'c'].join(','));
#example object
data = [
{
"id": 496,
},
{
"id": 381,
}
]
#expected result
'496,381'