Hey @akalati . I was using Open AI API to create my JSON so I changed the prompt so that the nested JSON output contained an identifier for the object it was nested in.
For example:
{ “Workout_Number”: 1,
“Workout_Name”: “Upper Body”,
“Exercises”: [
{“Name”: “Barbell Bench Press”,“Workout_Number”: 1 },
{“Name”: “Seated Rows”, “Workout_Number”: 1}]}
In this case the ‘exercise’ object contains the workout number of the ‘workout’ it is nested in.
I then ran seperate recursive backend workflows on list of workouts and list of exercises (with a 1 second delay for the latter). On the recursive workflow for list of exercise, after creating an exercise, I then made changes to a thing: 'do search for workouts where workout number = workout number in the exercise JSON. Therefore, linking the exercise to the workout it was nested in.