remove comma after the last element of array.