How to create a nested object given an array of keys – stackoverflow.com

Given is an array like this: var level = ["a", "b", "x"]; The output should be: { "a": { "b": { "x": { } } } } I tried this: var level = ["a", "b", ...

from Hot Questions - Stack Exchange OnStackOverflow
via Blogspot

Share this

Artikel Terkait

0 Comment to "How to create a nested object given an array of keys – stackoverflow.com"