I am pretty new to Jolt. The source format was generated from some software and does not have a good structure, so I would like to transform this. Each text ("First text" and "Second text") has an associated link ("First text" -> "Link of first text"; "Second text" -> "Link of second text"). How would you do such a transformation? Any help please?
Sample Input:
{
"flow": [
"^First text",
{
"*": ".^.c-0"
},
"^Second text",
{
"*": ".^.c-1"
},
{
"c-0": [
{
"->": "Link of first text"
}
],
"c-1": [
{
"->": "Link of second text"
}
]
}
]
}
Expected Output
{
"flow": {
"links": [
{
"message": "^First text",
"link": "Link of first text"
},
{
"message": "^Second text",
"link": "Link of second text"
}
]
}
}
Hello,
I am pretty new to Jolt. The source format was generated from some software and does not have a good structure, so I would like to transform this. Each text ("First text" and "Second text") has an associated link ("First text" -> "Link of first text"; "Second text" -> "Link of second text"). How would you do such a transformation? Any help please?
Sample Input:
Expected Output