Hello Poel van der, RE (Ron),
It seems like you're trying to process JSON data and insert it into a SQL table using a ForEach activity.
The error message you're receiving indicates that the length function is expecting an array or a string, but it's receiving an object instead. This typically means that the data structure you're working with is not in the expected format.
To resolve this issue, you'll need to ensure that the data passed to the items property in the ForEach activity is an array.
If @activity('wa_get_workspace_id').output is supposed to return an array but is returning an object, you might need to access the specific property of the output that contains the array.
Ex:
"items": "@activity('wa_get_workspace_id').output.Response"
If the Response property itself is a JSON string that represents an array, you'll need to parse it first before you can use it in the ForEach activity:
"items": "@json(activity('wa_get_workspace_id').output.Response)"
Once you have the array, you can iterate over each item and use a Copy activity within the ForEach loop to insert the data into your SQL table.
I hope this helps. Please let me know if you have any further questions.