Skip to content
Advertisement

Convert array objects to string and separate the values

I have the following result

JavaScript

What i want is to separate the object array values using a comma and return as a string, so as to have this result:

JavaScript

I have tried the following

JavaScript

This return :

JavaScript

How best can this be achieved?

Advertisement

Answer

You are missing the fact that you are dealing with an array of objects.

Looks like you can achieve that by doing:

JavaScript
User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement