FHIR server RESPONSE

Hello,

Doing a GET on a FHIR server. When nothing is returned I get this response:
How can I parse the total:0. and act on 0 records returned?

{ resourceType: ‘Bundle’,
id: ‘5909235f-dce8-4 from bc7-8849-28e47936084e’,
meta: { lastUpdated: ‘2019-06-26T19:39:57.235+00:00’ },
type: ‘searchset’,
total: 0,
link:
[ { relation: ‘self’,
url: ‘http://hapi.fhir.org/baseDstu3/Patient?family=xxxxxxxxxxxxxxxxxx’ } ] }