Hello,
I have the follwing array which I get from a SQL import, filtered and is now a single object array. It is stored like this in a compose action:
[
{
"ShipmentNumber": "1005",
"Analysis1": 23,
"Analysis2": 135655,
"Analysis3": null,
"Analysis4": 0,
"Analysis5": "10",
"Analysis6": "7"
}
]
I would like to remove the brackets [ ] from the start and end of the array, since these are creating some issues and using the values further. I would like to have the array in the exact same format.
I tried the follwing:
replace(replace(outputs('withBrackets'), '["', ''), '"]', '')
But I get the follwing errormsg:
Any help would be really appriciated.
I am having the same issue. Need a way to remove the square brackets without it adding backslashes. I've tried this into an array variable, which works but it cuts the dataset to a single array (from multiple): array(json(replace(replace(string(outputs('Merged_Data')),'[',''),']',''))). I think I need a way to convert it back to Json without cutting the dataset.
Hello,
I am running into the same issue.
I am trying to avoid using substring as it converts the array to a string and adds additional \ which I am unable to remove when using an append-to-string action.
Is there a way to:
A) remove the array [] without converting to string, OR
B) remove \ from a string? (I have tried the following:
replace(output('actionname'),'\','')
replace(output('actionname'),'\\','')
replace(output('actionname'),'\"','"')
but none of the worked.
Thanks in advance.
Since its an array you need to convert to string()
Try the following
stampcoin
87
Michael E. Gernaey
70
Super User 2025 Season 1
David_MA
48
Super User 2025 Season 1