cancel
Showing results for 
Search instead for 
Did you mean: 

Suppressing unwanted columns inside the Array

gowdhaman008
New Contributor II

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

1 REPLY 1

slaytanic70
New Contributor III

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.