Created
April 28, 2021 15:21
-
-
Save m-yahya/bd9250f7f6a9bff79f9f67348ac00178 to your computer and use it in GitHub Desktop.
Tutorial: Nested UI from JSON data and Tree view
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
// get items in the object | |
const getItems = (items) => { | |
for (const item in items) { | |
markupArray.push(`<li> ${item}`); | |
// fetch the parent object | |
let details = items[item]; | |
getDetails(details); | |
// push the closing tag for parent | |
markupArray.push("</li>"); | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment