Get Object from Api Call and save it in PageState

Resolved

Hello. Help me to understand.

There is a task:
1. Get an array of steps using an api call.
2. Save the result of this call to a list in the page state.
3. Display information from the object of this list in a text field on the page.

I made an api call and it returns data like this:
{"documents":[{"steps":[{"title":"Step 1","isFinished":true},{"title":"Step 2","isFinished":false},{"title":"Step 3","isFinished":true},{"title":"Step 4","isFinished":false}]}]}

I also created a "JSON Path" that returns a simple array.
[{"title":"Step 1","isFinished":true},{"title":"Step 2","isFinished":false},{"title":"Step 3","isFinished":true},{"title":"Step 4","isFinished":false}]

Next I created a Local Page State Variable - List<JSON> arrayOfSteps. And added an action flow that get my API Call with updated page state (Get JSON Path of API call results and Set Value to arrayOfSteps).

After this, I need to get the value $.isFinished from the state, where $.title is equal to the value and display it in a text field.
To try, I access the first element and take its value $.isFinished, but I get:
Bad state: No element

I assume that I am not saving the data correctly in PageStat, but I still can’t figure out what’s wrong. There may be a problem with the data type. Tell me how to understand this chain and how to diagnose intermediate data.

1
1 reply