What is JSON function?
JSON Function is used to convert STRING value into JSON ARRAY[] and it performs different functions. It also converts XML string values into JSON.
Description:
In this guide, we will discuss how to use the JSON function in power automate. Let’s create a new flow. To create a new flow follow the following instructions:
Go to power Power Apps:
Click on the ‘New Flow’ button:
After clicking new flow select ‘Instant Cloud flow’ form the dropdown:
Finally set its name and select ‘manually’ as flow trigger point:
In the below screenshot we set the Name of flow and its trigger point which is ‘Manually trigger a flow. Finally, click on the create button to create a new flow.
First of all, add INITIALIZE VARIABLE ACTION :
To initialize a variable select initialize variable action from the actions set. Then set its properties the same as mentioned in the screenshot.
Code:
json(variables('Name'))
call this function in it action using expression editor
Output:
It will give output in an array
Now add INITIALIZE VARIABLE second for XML:
Now add a COMPMOSE ACTION to convert string into json:
Code:
json(xml(variables('XML variable')))
call this function in it action using expression editor
Output:
It will return us an XML array in its output
0 Comments
Thanks for commenting. Your comment will be live soon after approval.