make parseJSON to handle top level JSON arrays