Skip to content

Instantly share code, notes, and snippets.

@kiknaio
Last active August 31, 2016 17:55
Show Gist options
  • Save kiknaio/475b936466132f426ec488b5080b701b to your computer and use it in GitHub Desktop.
Save kiknaio/475b936466132f426ec488b5080b701b to your computer and use it in GitHub Desktop.
Turning object into an array - JavaScript
let persons = {
"George Kiknadze" : {
"name" : "George",
"lasntame" : "Kiknadze"
},
"Luka Kiknadze" : {
"name" : "Luka",
"lastname" : "Kiknadze"
}
};
let personsArray = Object.keys(persons).map((value)=> {
return persons[value];
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment