'How create a decision tree structure in Strapi?

I am playing out with Strapi and I want to know how to create a tree structure for something like a questionnaire?

To give an example something like this: https://rxjs.dev/operator-decision-tree

I want to use Strapi cause I want to be able to change the text later if possible but I am not sure how the structure would look like. Can anyone suggest me how to implement this?

A single question would look like this?

{
  id: 1,
  label: "I have an existing Observable",
  options: [
    2, 3, 4, 5
  ]
}

And I need a way to set a single question as an option to another question until it gets to an answer which would look like:

{
  id: 99,
  label: "combineLatest",
  path: "<link to a strapi page with more info>"
}


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source