Skip to content

Instantly share code, notes, and snippets.

@abdes-zakari
Created September 2, 2022 11:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save abdes-zakari/475cca369642898e69247450351ce30a to your computer and use it in GitHub Desktop.
Save abdes-zakari/475cca369642898e69247450351ce30a to your computer and use it in GitHub Desktop.
const data = [
{ city: 'Madrid', country: 'ES' },
{ city: 'Berlin', country: 'DE' },
{ city: 'Paris', country: 'FR' }
];
const _data = data.map(i => i['city']) // ['Madrid', 'Berlin', 'Paris']
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment