- getJSONObject(): use the dot
.
accessor operator, followed by the name of the property:
const num = jsonObj.response.numFound;
- getJSONArray(): use the brackets
[]
accessor operator, plus the desired index:
const gotId4 = jsonObj.facet_counts.facet_fields.structHasAuthIdHal_fs[3];
1 Like