How can I format the address on the response from the API call?

Is there a way to get the response like the one in Address returned for patient by id by not from patient search ?

There are records which have no address line 1 for instance, so the array format is not really helpful:

image

Unfortunately not, this is a limitation of FHIR, from the PDS FHIR documentation

If any of the lines are blank, they are not returned due to FHIR conformance constraints.