I have this json in a Logic App variable. I want to 'id' property of this JSON and use further. How to get this id property value?
My json is:
{
"id": 1,
"name": "John bright",
"username": "Lily",
"email": "[email protected]",
}
JSON parsing is the process of converting a JSON object in text format to a Javascript object that can be used inside a program. In Javascript, the standard way to do this is by using the method JSON.
You said your json is a variable, but you don't mention which type it's stored.
Parse JSON
action then you will be able to select property. About the Parse JSON
Schema, just click the Use sample payload to generate schema
and paste your json value, it will generate. And select your property just use the @{body('Parse_JSON')?['name']}
, it will work.variables('test1')['name']
to get it.Use the Parse Json action and use your payload as a "Use sample payload to generate schema". After that, id will be listed as a Dynamic content from the Parse Json action.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With