Add 3rd argument to getJSONAttr to specify the rtn type.