Всем привет, есть вопрос по построению вложенных комментариев. Каким образом лучше это реализовать? С бэка приходит такой JSON:
[
{
"commentText": "Это родитель",
"pageID": 1,
"userID": 1,
"date": "2021-12-25 14:00:00",
"path": "000000001",
"dateModified": "2021-12-25 14:00:00",
"isDelete": "False",
"isPrivate": "False",
"attachment": []
},
{
"commentText": "Это первый потомок",
"pageID": 1,
"userID": 2,
"date": "2021-12-25 14:10:00",
"path": "000000001000000002",
"dateModified": "2021-12-25 14:10:00",
"isDelete": "False",
"isPrivate": "False",
"attachment": []
},
{
"commentText": "Это второй потомок",
"pageID": 1,
"userID": 3,
"date": "2021-12-25 14:15:00",
"path": "000000001000000003",
"dateModified": "2021-12-25 14:15:00",
"isDelete": "False",
"isPrivate": "False",
"attachment": []
},
{
"commentText": "Это третий потомок",
"pageID": 1,
"userID": 4,
"date": "2021-12-25 14:20:00",
"path": "000000001000000002000000003",
"dateModified": "2021-12-25 14:20:00",
"isDelete": "False",
"isPrivate": "False",
"attachment": []
},
{
"commentText": "Это четвертый потомок",
"pageID": 1,
"userID": 1,
"date": "2021-12-25 14:12:00",
"path": "000000001000000003000000004",
"dateModified": "2021-12-25 14:12:00",
"isDelete": "False",
"isPrivate": "False",
"attachment": []
}
]