Suppressing unwanted columns inside the Array

Hi,

I have following json data. It has array of map with 3 different columns in it.

Input:
[{
“Phone”: [{
“Phone”: “3333333333”,
“PhoneType”: “1”,
“DonotCall”: “Y”
},
{
“Phone”: “1234567890”,
“PhoneType”: “2”,
“DonotCall”: “N”
}]
}]

Expected Output:
[{
“Phone”: [{
“Phone”: “3333333333”,
“PhoneType”: “1”,
},
{
“Phone”: “1234567890”,
“PhoneType”: “”,
}]
}]

I wanted to suppress “DonotCall” column.

Can you please help me with what function I need to use in Mapper to achieve this?

Thanks,
Gowdhaman

Gowdhaman,

In the MAPPER, add this to the left side:
jsonPath($, “$Phone[*].DonotCall”)

Also, to be safe, check the boxes for Null-Safe Access and Pass Through. Then you will get your desired result.

1 Like