Use premade Json file with yarn?

So i have this game in my backlog of projects and i got stumped when creating my dialouge system. I had a really specific plan for how the dialouge was going to work and for some reason i instited that i wasnt going to use yarn. but now i havent worked on it for a while and the code for that system is super hard to debug and is just a pool of spagetti

so heres how it worked

[
{"side":1,"chara":0,"Name":"phold","dlgs":"Hello there","pose":0,"next":[],"branch":false},
{"side":0,"chara":0,"Name":"phold","dlgs":"hi","pose":0,"next":[],"branch":false},
{"side":0,"chara":0,"Name":"phold","dlgs":"","pose":0,"next":[],"branch":false},
{"side":0,"chara":0,"Name":"phold","dlgs":"","pose":0,"next":[],"branch":false},
{"side":0,"chara":0,"Name":"phold","dlgs":"","pose":0,"next":[],"branch":false},
{"side":0,"chara":0,"Name":"phold","dlgs":"","pose":0,"next":[],"branch":false}

]

here is the json file i was using


and here is the code for the dialouge.

basicaly, there is an input number that that will fill an array with numbers that corolate to the indexes of the objects in the json. then I use that to pick what charater portait will aper if you get an item. receiving a quest etc.

the problem is that it cant advance to the next line of dialouge and ill also need to be able to trigger a dialouge senario on the fly and have points in the code that will pan the camera and have charaters do animations and such.

so can i use the already made Json with yarn?

I could be wrong, but I had a similar problem in the past. I solved it using GDevelop’s repeat command. Since sometimes I didn’t know how many objects I would create, I would increase the number of repetitions (like 100), but I discovered that if Yarn had fewer commands than 100, GDevelop would only execute those.

I’ll add: in Yarn, you should create a command (for example, Array). Then repeat that command on each line in Yarn. After that, in GDevelop, you use the repeat function.