use new toJSONArray instead of temp toJSONArray3; add json param toJSONArray