Click here to Skip to main content
16,017,881 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
parent comment i added
{
"_id" : ObjectId("53f444346c7daef32e037894"),
"depth" : "0",
"path" : "null",<----parent means null-->
"created" : ISODate("2014-08-20T06:46:12.966Z"),
"user_id" : "1",
"body" : "hai...... hello ",
"thread_id" : ObjectId("53eb0766b95f2c98221958c8"),<--------here i store post ObjectId of parent ObjectIdid----->
"type" : "PHOTO"
}
------------------------------------------------------------------------------------------------
child comment added


"_id" : ObjectId("53f447216c7dd90caaffd012"),
"depth" : "1",
"path" : "53f444346c7daef32e037894",<--------here i store ObjectId of parent ObjectIdid----->[]
"created" : ISODate("2014-08-20T06:58:41.547Z"),
"user_id" : "1",
"body" : "hai.. hello ....",
"thread_id" : ObjectId("53eb0766b95f2c98221958c8"),<--------here i store post ObjectId of parent ObjectIdid----->

"thread_type" : "PHOTO"

------------------------------------------------------------------------------------------------
i have to show:
post 1
parent 1
child 1
child 1.1
child 2
child 2.1
child 2.1.1
child 3
child 3.1
...
..
...

parent 2
child 1
child 1.1
child 2
child 2.1
child 2.1.1
child 3
child 3.1
...
....

-----------------------------------------------------------------------------------------------
post 2
parent 1
child 1
child 1.1
child 2
child 2.1
child 2.1.1
child 3
child 3.1
...
..
...

parent 2
child 1
child 1.1
child 2
child 2.1
child 2.1.1
child 3
child 3.1
...
....
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900