I’m trying to work out how to get a parent comment (if any) of a comment. The API documentation lists an attribute of comments ‘path’, which seems to hold a real, but it doesn’t explain anywhere (that I could find), how to derive the parent comment from that.

Can anyone point me towards a resource to help me work this out?

Thanks in advance.

  • @RookiMA
    link
    English
    1
    edit-2
    11 months ago

    Path is build up like this:

    “0.97159.97160”

    0 = The post itself
    97159 = the parent comment id
    97160 = the “current” comment id ( should be the same as comment.id )

    You can ping me if you have another question!

      • @RookiMA
        link
        English
        111 months ago

        I didnt understood it at first too. But after checking what the numbers are i can share that information :)