Converting XML Format data to JSON Format and performing data Operations using Azure Logic app

 TASK :

Convert the XML format data into JSON Format and retrieve only the required data from it using Azure Logic apps.

Sample XML data:


This is the sample data, we need to convert this data into JSON first after that we need to perform Transformations.

Expected output:

Solution:



Here I have taken a total of 4 activities HTTP trigger, Get blob content, and Compose.

To trigger the logic app I have taken an HTTP trigger.


Here I am retrieving an XML file from the blob by using the Get blob content Activity.


After getting file content from the blog we need to convert the data format XML to JSON. So I have taken Compose activity and I have written Expression to convert XML to JSON.


Expression :

       


After this activity, the entire data will be converted into a JSON format as mentioned below


But we need to get the data from ENO to Position Title for that I have taken one more Compose activity and there I have written one expression to get the required data. 


Expression:

outputs('Compose')['soap-env:Envelope']['soap-env:Body']['n0:ZhrRfcStaffMasterDataResponse']  ['PeEmployee']

The soap-env: Envelope, soap-env: Body, n0:ZhrRfcStaffMasterDataResponse, and PeEmployee parameters will be there in the XML data itself.

By using this method we can easily convert XML to JSON and also we can able to retrieve the particular Data what we want.


 











   


















Comments

Popular posts from this blog

Loading Multiple JSON Files Into Different Tables Using AZURE DATA FACTORY

Getting application error details in Logic Apps using Chat GPT in exception handling