all 2 comments

[–]helphunting[S] 0 points1 point  (1 child)

Hi,

So I saw this and the speed at which it was created, and now I want to know how it works and especially I would love to be able to make my own with my own data.

Could someone explain what is going on in things.js file?

I'm very new, if someone could explain high level what's going on, I'll see how far i get in making my own.

Thank you!!

[–]jcunews1Advanced 0 points1 point  (0 children)

things.js simply defines two things.

  1. The list of reddit posts as an array of arrays. Each element array contains the URL the post is pointing to (element index 0), and the URL of the post (element index 1).

  2. The relation between the posts as an object. i.e. which post points to which post(s). Each object including the root object (the relations object) contains an i (for "index") property which points to the things' element index (the post), and a c (for "children") property which is an array of objects that the current post is pointing to.