0
votes

I have this payload in my mule project:

[{"a":"1", "b":"2", "c":"3"}, {"a2":"1", "b2":"2", "c2":"3"}, {"a3":"1", "b3:2", "c3:3"},]

my question is how to remove the , right before the end of the payload?

2

2 Answers

1
votes

At the end is just java so you can do it like explained here:

Remove trailing comma from comma-separated string

In mel it will look like

#[payload.replaceAll(",$", "")]
0
votes

In Mule 4:

payload replace "," with ""