Retrieve online JSON data

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