Hi Everyone,
Hope you are doing good
Can anyone help me to extract below highlighted value from a Json response.
{
“processPhase”: “Complete”,
“processPhaseDescription”: “Complete”,
“processStartTime”: “2024-05-22T16:42:22.801Z”,
“processor”: “test”,
“product”: “AR”,
“requestId”: 456789,
“requestMode”: “Fusion”,
“requestParameters”: [
{
“name”: “jobExecutesVirusScanOnOutputFiles”,
“paramType”: “BOOLEAN”,
“value”: “false”
},
{
“name”: “outputOverrideParameter”,
“paramType”: “STRING”,
“value”: “369213”
},
{“name”: “submit.argument6”},
{“name”: “submit.argument5”},
Anil_G
(Anil Gorthi)
2
@divya.x.kuchi
Use dessrialize json activity and pss string…then from output variable use below
Jobj("requestParameters")(1)("value").Tostring
Cheers
lrtetala
(Lakshman Reddy)
3
Hi @divya.x.kuchi
Try this
jsonObj("requestParameters").Children().Where(Function(x) x("name").ToString() = "outputOverrideParameter").Select(Function(x) x("value").ToString()).FirstOrDefault()
Regards,
Hi @divya.x.kuchi
jsonObject("requestParameters")(1)("value").Tostring
postwick
(Paul Ostwick)
5
Everyone is saying to do it by the index (1) of that property, but it would be better to…
- Deserialize JSON the entire thing into a JObject
- Deserialize JSON Array just yourJObjVar(“requestParameters”).ToString
- For Each over requestParametersJArray
-
- If currentItem(“name”).ToString = “outputOverrideParameter”
- – Then get currentItem(“value”).ToString
This way it’s getting the value of the outputOverrideParameter not just hoping it’s always the second one.
system
(system)
Closed
6
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.