Skip to content

Instantly share code, notes, and snippets.

@dlford
Created August 23, 2023 23:30
Show Gist options
  • Save dlford/60ab49d0466c957c7745059022e27e09 to your computer and use it in GitHub Desktop.
Save dlford/60ab49d0466c957c7745059022e27e09 to your computer and use it in GitHub Desktop.
JS example output
[
{
"id": "131cf4bb-1971-43a2-992f-2cbb042a4184",
"pid": "",
"text": "comment 2",
"children": [
{
"id": "4c93a789-ecab-4173-954c-b039cd3a9e17",
"pid": "131cf4bb-1971-43a2-992f-2cbb042a4184",
"text": "comment 3"
},
{
"id": "c7974b6d-67e1-47d0-84fa-c78d51682df2",
"pid": "131cf4bb-1971-43a2-992f-2cbb042a4184",
"text": "comment 4"
}
]
},
{
"id": "386c4439-4596-47c1-99bf-cb479055fe5a",
"pid": "",
"text": "comment 5",
"children": [
{
"id": "5ef0816e-ea13-4a7e-8009-e67ee08ef906",
"pid": "386c4439-4596-47c1-99bf-cb479055fe5a",
"text": "comment 6"
}
]
},
{
"id": "96b0a536-602b-4f3f-a352-020f22cdfb18",
"pid": "",
"text": "comment 7",
"children": [
{
"id": "d0f11e98-deea-4fd5-becb-8f406ebcae83",
"pid": "96b0a536-602b-4f3f-a352-020f22cdfb18",
"text": "comment 8"
}
]
},
{
"id": "bad87461-3cbf-4ecb-a8c7-36876b57d652",
"pid": "",
"text": "comment 9",
"children": [
{
"id": "e3ee6f90-495f-4348-9c29-bd6e15ec3b39",
"pid": "bad87461-3cbf-4ecb-a8c7-36876b57d652",
"text": "comment 10"
}
]
},
{
"id": "6a162b3f-9341-46e9-95f7-dedc6cd06868",
"pid": "",
"text": "comment 11",
"children": [
{
"id": "f1c3a838-f4b4-4ebd-bb1b-d3e4c0dce27d",
"pid": "6a162b3f-9341-46e9-95f7-dedc6cd06868",
"text": "comment 1"
}
]
},
{
"id": "041c7c2d-0688-491e-b6cd-899eac95bd3d",
"pid": "",
"text": "comment 12",
"children": [
{
"id": "5acdf3ff-345b-47a5-bd66-a6687a1441b7",
"pid": "041c7c2d-0688-491e-b6cd-899eac95bd3d",
"text": "comment 13"
}
]
},
{
"id": "aaee2ae5-7e3a-4435-a094-83bf6b77abfb",
"pid": "",
"text": "comment 14",
"children": [
{
"id": "6108b28c-a7af-4c5a-a38c-c22db0d34b31",
"pid": "aaee2ae5-7e3a-4435-a094-83bf6b77abfb",
"text": "comment 15"
}
]
},
{
"id": "1736393e-95b0-4f5d-a149-50fe52c28350",
"pid": "",
"text": "comment 16",
"children": [
{
"id": "b646f202-17aa-4af9-b8dc-c1d8ff3529ac",
"pid": "1736393e-95b0-4f5d-a149-50fe52c28350",
"text": "comment 17",
"children": [
{
"id": "a8827b1d-fdbc-41c2-bdb5-38e8b308dedc",
"pid": "b646f202-17aa-4af9-b8dc-c1d8ff3529ac",
"text": "comment 18",
"children": [
{
"id": "76e49597-6039-4cb5-a595-556ccc2e3c12",
"pid": "a8827b1d-fdbc-41c2-bdb5-38e8b308dedc",
"text": "comment 19",
"children": [
{
"id": "07dc4b90-65d3-4f75-8351-457305988235",
"pid": "76e49597-6039-4cb5-a595-556ccc2e3c12",
"text": "comment 20",
"children": [
{
"id": "2d4e838b-82df-4ca0-bf9b-f1dfb99d6763",
"pid": "07dc4b90-65d3-4f75-8351-457305988235",
"text": "comment 21"
}
]
}
]
}
]
}
]
}
]
},
{
"id": "617c1760-0dca-409c-af2a-c614f0530e07",
"pid": "",
"text": "comment 22",
"children": [
{
"id": "712c0b7e-a9e4-40fd-ab78-c39b483b1435",
"pid": "617c1760-0dca-409c-af2a-c614f0530e07",
"text": "comment 23"
}
]
},
{
"id": "e325094c-886e-42c9-bd59-fdd7a189b384",
"pid": "",
"text": "comment 24",
"children": [
{
"id": "f3b8b0f9-edef-4ee6-9555-42e8595f854c",
"pid": "e325094c-886e-42c9-bd59-fdd7a189b384",
"text": "comment 25"
}
]
},
{
"id": "6e09a231-a2ee-4aa1-a898-57695e6fe153",
"pid": "",
"text": "comment 26",
"children": [
{
"id": "63e629d6-c0f9-4b36-ad96-e0c47cf8bb4e",
"pid": "6e09a231-a2ee-4aa1-a898-57695e6fe153",
"text": "comment 27"
}
]
},
{
"id": "d7b698f1-8757-46db-a6e6-5141a481b42b",
"pid": "",
"text": "comment 28"
},
{
"id": "a7e3d522-553c-44f1-befa-047bd94f0e59",
"pid": "",
"text": "comment 29"
},
{
"id": "fe78ce24-c2c8-4d00-b96d-8b8be9ce0f06",
"pid": "",
"text": "comment 30"
},
{
"id": "fabdccb5-a024-4476-bd51-7d55fb685c42",
"pid": "",
"text": "comment 31",
"children": [
{
"id": "608d0693-6e43-46a0-9e54-107da6adb109",
"pid": "fabdccb5-a024-4476-bd51-7d55fb685c42",
"text": "comment 32"
}
]
}
]
comments 32 arranged 32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment