0

My map function:

const artists = this.props.result.artists.map((artist) => {
        return <Link value={artist.name} className='artist-title'>{artist.name}</Link>
    });

When displayed with:

artists.join(', ');

Results in: [object Object], [object Object]

When simply displayed with:

artists

Results in: EminemNate Dogg

My goal is: Eminem, Nate Dogg

How would I go about doing that?

3
  • the question isnt how, the question should why Commented May 25, 2021 at 19:09
  • 1
    These are not HTML elements. This is jsx. They are all objects. What is the expected output? Commented May 25, 2021 at 19:10
  • Are you sure you have array of string in artists? Commented May 25, 2021 at 19:10

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.