I am using jolt to convert one json to another json but I am not getting correct output json for given input json
Input :
{
"user":{
"homePhone":"12345678901",
"mobilePhone":"12346750983",
"email":"test@example.com"
}
}
Expected Json :
{
"contact":[
{
"class":"PhoneClass",
"phoneNumber":"12345678901",
"mobile":false,
"preferred":false
},
{
"class":"PhoneClass",
"phoneNumber":"12346750983",
"mobile":true,
"preferred":true
},
{
"class":"EmailClass",
"email":"test@example.com"
}
]
}
In output json there are some extra field also I need to add.