I want to fetch a value from json and store it in a variable in Azure API Management. JSON Example which is coming in request Body is
{
"ItemCode": 1,
"ItemName": "USA",
"typeCode": "REG"
}
I need to fetch value of ItemCode and typeCode and store it in a variable.
I have check on Microsoft Docs and all it gives me to transform body by using liquid template which I suppose is of no use in my requirement.
I have stored a JSON in a variable like
set-variable name="varItemCode" value="@(context.Request.Body.As<String>(preserveContent:true))" />
Since this is stored a string I am not able to traverse the JSON Object.