fix the startkey and endkey array JSON