I want to parse through a json and update specific nodes in json result according to the following code snippet written in power shell:
foreach($val in $getresult.elements.values)
{
if($val.Name -eq "Config")
{
$val.items.Service=$ServiceValue
}
if($val.Name -eq "Analysis")
{
$val.items.ID=$IDValue
$val.items.Name=$NameValue
}
if($val.Name -eq "Report")
{
$val.items.to=$ToValue
}
}
The final $getresult
elements/nodes should be updated with $ServiceValue
, $NameValue
and $ToValue
. How do I achieve it in logic apps?