โ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.