removing trailing , in json