Answer the question
In order to leave comments, you need to log in
How to properly implement nested comments?
Hello everyone, I have a question about building nested comments. What is the best way to implement this? The following JSON comes from the back:
[
{
"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": []
}
]
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question