VIKRAM
VIKRAM

Reputation: 29

How to transform xml to json and json to xml dynamically in Azure logic app

In Azure logic app how to convert xml to json or json to xml based on the requirement.

The data is dynamic i,e they can be in any format. And xpath expression is required to get the required node.

Upvotes: 0

Views: 2850

Answers (1)

felixmondelo
felixmondelo

Reputation: 1474

The functions that you said are the correct ones, here is an example to get an xpath value from an input converted in xml:

  "Initialize_variable": {
            "inputs": {
                "variables": [
                    {
                        "name": "xpathValue",
                        "type": "String",
                        "value": "@xpath(xml(body('Get_blob_content_using_path')), 'string(/*[local-name()=\"Part\" and namespace-uri()=\"\"])')"
                    }
                ]
            },

Upvotes: 1

Related Questions