removes two trailing commas from JSON object array