Last active
March 5, 2021 11:58
-
-
Save muhsalaa/5199c3025e40dff4aa45219a58c0cf40 to your computer and use it in GitHub Desktop.
This file contains 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
// ref https://codepen.io/Pestov/pen/BLpgm | |
const tree = { | |
root: { | |
root1: { name: "Kakek", deceased: true }, | |
root2: { name: "Nenek", deceased: false }, | |
childs: [ | |
{ | |
name: "Anak 1", | |
spouse: [{ name: "Istri anak 1", deceased: false, divorced: true }], | |
deceased: false, | |
childs: [ | |
{ | |
name: "Cucu 1", | |
spouse: [{ name: "Suami cucu 1", deceased: false, divorced: false }], | |
deceased: false, | |
childs: [ | |
{ | |
name: "Cicit 1", | |
spouse: null, | |
deceased: false, | |
childs: [] | |
} | |
] | |
} | |
] | |
} | |
] | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment