I have a scenario where I need to split a string say "VIP tickets John Smith concert today at 4pm and later dinner" into parts where each part is upto 35 chars long. I can see for and slice but this has to be done in a loop to create following json
{
"Informations": [
{
"Information": "VIP tickets John Smith concert toda"
},
{
"Information": "y at 4pm and later dinner"
}
]
}
how should I slice it? I am trying to write liquid transformation for logic app
{
"Informations": [
{
"Information": "VIP tickets John Smith concert toda"
},
{
"Information": "y at 4pm and later dinner"
}
]
}
Using Slice expression and compose action, you can split string into multiple words and form the Json. Below are steps I followed,
slice(variables('string var'),35,70).This will split string into another string with length of 35.
Output of Initialize variable 2&3
Output of last compose action,