power automate - How to get the columns from a Microsoft list row into an array of strings - Stack Overflow

admin2025-04-27  3

I'm getting one row from a Microsoft list and want to loop though each column in the row, the problem I'm having is putting each into an array so I can user a loop. All i need is the column names , not the row values.

I know in can access the using the dynamic content but I need to pull a row and it can be different lists.

Does anyone know how it can be done?

Thanks.

I have tried using json and compose but I can't get it for work.

I'm getting one row from a Microsoft list and want to loop though each column in the row, the problem I'm having is putting each into an array so I can user a loop. All i need is the column names , not the row values.

I know in can access the using the dynamic content but I need to pull a row and it can be different lists.

Does anyone know how it can be done?

Thanks.

I have tried using json and compose but I can't get it for work.

Share Improve this question edited Jan 11 at 14:18 Amazon Dies In Darkness 5,86312 gold badges58 silver badges79 bronze badges asked Jan 11 at 13:15 PaulPaul 133 bronze badges 1
  • 1 Show us the JSON you’re working with and I reckon I can show you an approach. – Skin Commented Jan 11 at 20:32
Add a comment  | 

1 Answer 1

Reset to default 0

You can do this with xpath.

Create a new Select action under Data Operations, and set the following:

From:
xpath(xml(json(concat('{"body":', outputs('Get_item')?['body'], '}'))), 'body/*')
Map:
xpath(item(), 'name(/*)')

This will return a string array of the column names.

Note: in the Select action, click on the Switch map to text mode button (looks like

转载请注明原文地址:http://anycun.com/QandA/1745710100a91143.html