Hi Team, Want to know if there is any possibility in JOLT, to check in the existing json array, if single json child exists, then convert it to ONE or else keep it as it is. Can someone please help on this.
Input:
{
"meta" : { },
"data" : [ { // data is an array having single json node
"attributes" : {
"test" : "2021-10-21T12:47:05.603+02:00"
},
"id" : "1018512922",
"type" : "REST"
} ]
}
Output:
{
"meta" : { },
"data" : { // Array need to be converted to ONE
"attributes" : {
"test" : "2021-10-21T12:47:05.603+02:00"
},
"id" : "1018512922",
"type" : "REST"
}
}
Thankful to jolt team for doing this project, which saved me lot of time.
Hi Team, Want to know if there is any possibility in JOLT, to check in the existing json array, if single json child exists, then convert it to ONE or else keep it as it is. Can someone please help on this.
Input: { "meta" : { }, "data" : [ { // data is an array having single json node "attributes" : { "test" : "2021-10-21T12:47:05.603+02:00" }, "id" : "1018512922", "type" : "REST" } ] } Output: { "meta" : { }, "data" : { // Array need to be converted to ONE "attributes" : { "test" : "2021-10-21T12:47:05.603+02:00" }, "id" : "1018512922", "type" : "REST" } }
Thankful to jolt team for doing this project, which saved me lot of time.