12-03-2020 03:55 PM
Hi,
We have a requirement to remove the null values elements from the json. Below is the example JSON which is having null values at Root and child levels. We need a solution to remove nulls at all levels and if all elements in child are removed then the entire child should get remove.
Could you please provide the pipeline solution for it.
Example:
{
“Root”:{
“Element1”:“1”,
“Element2”:“A”,
“Element3”:null,
“Child1”:{
“Element4”:“1”,
“Element5”:null
}
“Child2”:{
“Element6”:“1”,
“Child3”:{
“Element7”:“1”,
“Element8”:null,
“Child4”:{
“Element9”: null
}
}
}
}
}
Expected Result:
{
“Root”:{
“Element1”:“1”,
“Element2”:“A”
“Child1”:{
“Element4”:“1”
}
“Child2”:{
“Element6”:“1”,
“Child3”:{
“Element7”:“1”
}
}
}
}
12-04-2020 02:25 AM
I think that the expression from the below post will help you to achieve the desired output:
Regards,
Spiro Taleski
12-08-2020 07:04 PM
@Spiro_Taleski - Thank you! Yes I checked this article and it worked.