azureazure-logic-appsworkflow-definition-language

Azure logic apps http connector does not parse json in queries


    {
      "Query": {
        "inputs": {
          "headers": {
            "Content-Type": "application/json"
          },
          "method": "GET",
          "queries": {
            "f": "json",
            "temp": "\"test\": @json(body('http'))['candidates'][0]['location']['x']"
          },
          "uri": "https://testurl.com/restApi"
        },
        "runAfter": {

        },
        "type": "Http"
      }
    }

It reads "temp" as "test" : @json(body('http'))['candidates'][0]['location']['x']"

If I change this line to

    "temp": "@json(body('http'))['candidates'][0]['location']['x']"

It read the correct value from json. Not sure if its a bug, or I am missing some syntax.


Solution

  • Can you try with the following syntax:

    "temp": "\"test\": @{json(body('http'))['candidates'][0]['location']['x']}"