removed unneccesary spaces/characters from arrayToJsonHelper output