01-15-2019 01:04 AM
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
01-16-2019 01:25 PM
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.