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?