cancel
Showing results for 
Search instead for 
Did you mean: 

Head's Up! Site migration is underway. Expect disruption to service on Thursday, Feb. 9!

Import a JSON file with recursive

gorkasalauniver
Node Clone

Hello there, I'm trying to solve a problem that I have.

I have 3 senteces to show the example:

R1: (( A && ( B || C )) && H )
R2: ( A || B )
R3: ( A || B ) && C

So my goal is import this with a JSON, and make a graph like this:

So the JSON I have is this:

[
{
	"id" : "R1",
	"sentence" : {
		"operator": "&&",
		"left" : "H",
		"right" : {
			"operator" : "&&",
			"left" : "A",
			"right" : {
				"operator" : "||",
				"left" : "B",
				"right" : "C"
			}
		}
	}
},
{
	"id" : "R2",
	"sentence" : {
		"operator": "||",
		"left" : "A",
		"right" : "B"
	}
},

{
	"id" : "R3",
	"sentence" : {
		"operator": "&&",
		"left" : {
			"operator" : "||",
			"left" : "A",
			"right" : "B"
		},
		"right" : "C"
	}
}


]

It's possible to import a JSON like the example and get a graph like the example?

0 REPLIES 0