Last active
August 15, 2019 15:00
-
-
Save jinwood/ef58e8136db2a6a6c1c7629777ab6213 to your computer and use it in GitHub Desktop.
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
const input = [ | |
{ | |
id: '79b1da7f-f647-4e29-b1b6-3a094afddedc', | |
name: 'Root Organization', | |
children: [ | |
{ | |
id: '8ff4da80-271e-4d98-220b-08d63febf597', | |
name: 'Huge CSP 1', | |
children: [ | |
{ | |
id: '216b6265-cc5f-4860-bf39-37fd1d196b01', | |
name: 'Cool Reseller 1', | |
children: [ | |
{ | |
id: 'a35bae48-32d1-44ed-8e55-72a281825c84', | |
name: "Chocolate o' the World LLC", | |
children: [], | |
parentId: '216b6265-cc5f-4860-bf39-37fd1d196b01', | |
}, | |
{ | |
id: '2d3d6fc8-e8ce-4bbc-83d6-4ee79e6b21ef', | |
name: 'Pizza Makers Co.', | |
children: [ | |
{ | |
id: '1aef7640-54ca-4957-b811-c6668bbdf70f', | |
name: 'Test', | |
children: [], | |
parentId: '2d3d6fc8-e8ce-4bbc-83d6-4ee79e6b21ef', | |
}, | |
], | |
parentId: '216b6265-cc5f-4860-bf39-37fd1d196b01', | |
}, | |
], | |
parentId: '8ff4da80-271e-4d98-220b-08d63febf597', | |
}, | |
{ | |
id: '1497f42b-e31c-4701-ba96-253fbf893dd9', | |
name: 'Small Reseller Inc.', | |
children: [ | |
{ | |
id: 'c622a711-aa54-43a5-9096-49cf5e3cdd1a', | |
name: 'Milk Bottling Limited', | |
children: [], | |
parentId: '1497f42b-e31c-4701-ba96-253fbf893dd9', | |
}, | |
], | |
parentId: '8ff4da80-271e-4d98-220b-08d63febf597', | |
}, | |
], | |
parentId: '79b1da7f-f647-4e29-b1b6-3a094afddedc', | |
}, | |
{ | |
id: '4753ac93-3b41-4421-b759-08d685fae7c3', | |
name: 'Roman 2', | |
children: [ | |
{ | |
id: 'bb2d0bcf-95ab-4ad1-bab3-b70c67d558d0', | |
name: 'new test', | |
children: [], | |
parentId: '4753ac93-3b41-4421-b759-08d685fae7c3', | |
}, | |
{ | |
id: 'adedc666-b256-40ce-bacb-9ac43ab687aa', | |
name: 'test222', | |
children: [ | |
{ | |
id: 'e3de6d03-602a-4ef9-8986-baaf513b4fa8', | |
name: '2019', | |
children: [], | |
parentId: 'adedc666-b256-40ce-bacb-9ac43ab687aa', | |
}, | |
{ | |
id: 'f08370dd-d345-47ca-8836-a6df7c45f024', | |
name: '888', | |
children: [], | |
parentId: 'adedc666-b256-40ce-bacb-9ac43ab687aa', | |
}, | |
{ | |
id: '6e4960a6-36f4-4fb6-b828-c440e0c600e0', | |
name: '999', | |
children: [], | |
parentId: 'adedc666-b256-40ce-bacb-9ac43ab687aa', | |
}, | |
{ | |
id: 'e1ad35a7-3480-4f61-8559-cbc201ebaf72', | |
name: 'new', | |
children: [], | |
organizationType: 2, | |
}, | |
{ | |
id: 'bb69c8a0-c3f8-450f-a800-2447d8a7ef03', | |
name: 'test4', | |
children: [], | |
parentId: 'adedc666-b256-40ce-bacb-9ac43ab687aa', | |
}, | |
{ | |
id: '8aca4e98-7e25-4bcf-85fe-341223c25699', | |
name: 'test9', | |
children: [], | |
parentId: 'adedc666-b256-40ce-bacb-9ac43ab687aa', | |
}, | |
], | |
parentId: '4753ac93-3b41-4421-b759-08d685fae7c3', | |
}, | |
{ | |
id: 'ebd0757d-f2f5-46cc-b37d-9802e7f52749', | |
name: 'test3', | |
children: [], | |
parentId: '4753ac93-3b41-4421-b759-08d685fae7c3', | |
}, | |
], | |
parentId: '79b1da7f-f647-4e29-b1b6-3a094afddedc', | |
}, | |
], | |
parentId: null, | |
}, | |
]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment