I have an array of country objects (countries) and I'm trying to get just an array of the String names, so from this example:
Just: ['Canada', 'USA', ..] etc.
I'm trying to do this with
const getNames = (countries) => countries.map(({ Name }) => Name);
but I can't seem to get it. Any suggestions?
getNames? Please replace the image with a text-based minimal reproducible examplecountryNames = getNames(countries)