
Announcements
Step A: Check the actual data structure
['results'][0]['tables'][0]['rows'] actually containsStep B: Generate proper schema
rows arrayOption A: Use a different expression in Apply to each
Instead of body('Parse_JSON'), try:
outputs('Parse_JSON')
Option B: Parse the string if it's JSON
If the rows data is a JSON string, add a Compose action before Apply to each:
json(body('Parse_JSON'))
Then use outputs('Compose') in Apply to each.
Step 1: Initialize Variable
ParsedRowsArrayStep 2: Skip Parse JSON
Step 3: Apply to Each
variables('ParsedRows')Add these temporary actions to debug:
Debug Action 1: Compose - Check Query Output
body('Run_a_query_against_a_dataset')
Debug Action 2: Compose - Check Rows Structure
body('Run_a_query_against_a_dataset')?['results']?[0]?['tables']?[0]?['rows']
Debug Action 3: Compose - Check Type
string(body('Run_a_query_against_a_dataset')?['results']?[0]?['tables']?[0]?['rows'])
Add a condition before Apply to each:
Condition: Check if it's an array
equals(string(type(body('Parse_JSON'))), 'Array')
If True: Use body('Parse_JSON') in Apply to each
If False: Use array(body('Parse_JSON')) or handle as string
TableRowsArraybody('Run_a_query_against_a_dataset')['results'][0]['tables'][0]['rows']variables('TableRows')item()item()['ColumnName'] for specific values