Add open and close square brackets to a list in sling model
Hi Team ,
I need to enclose the arraylist within square bracket and so used list.add("[") at the start and at the end as list.add("]") but it appends comma with the list .But need to get rid off the comma from the list and so could anyone please suggest on this .
Actual:[, [1245,480], [, [350,280], [300,250], ], ], [, [800,480], [, [300,250], [728,90], ], ]
Expected:[ [1245,480], [[350,280], [300,250]]], [[800,480], [[300,250], [728,90]]]