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
...
....