Created
March 26, 2017 15:17
-
-
Save thcolin/0f1bcf42bbf17de080070985a455945b to your computer and use it in GitHub Desktop.
Javascript deep array merge and map exercise
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var e = { | |
itag: ['a', 'b'], | |
s: ['a', 'b'], | |
url: ['a', 'b'] | |
} | |
var f = { | |
itag: ['c', 'd'], | |
s: 's', | |
url: ['c', 'd'] | |
} | |
var g = [ | |
{ | |
itag: 'a', | |
s: 'a', | |
url: 'a' | |
}, | |
{ | |
itag: 'b', | |
s: 'b', | |
url: 'b' | |
}, | |
{ | |
itag: 'c', | |
s: 's', | |
url: 'c' | |
}, | |
{ | |
itag: 'd', | |
s: 's', | |
url: 'd' | |
} | |
] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Solution by @soyuka : https://gist.github.com/soyuka/61402fb9b20368a9a5ea138f8e01ee1d