Change API not to return JSON array