I have a list of json-formatted documents I need to consolidate into list of strings, each shorter than a preset number of characters. Hence, I need loop through the list, joining the elements until the length of string reaches certain limit, something like:
for doc in list :
while lenght(jsondecode(i) < limit :
append (join(",", concatenate(doc, doc[index+1])), final_list)
So, the goal is: split this list into subelements where none of them contains more than N number of characters. Can anyone help, please?