I have a JSON string:
{addressDetails=({addressId=56941, addressLine1=76 Kilaben Rd, addressLine2=null, addressLine3=null, addressType=H, countryCode=AUS, locality=KILABEN BAY, postcode=2283, sortplan=017, state=NSW, ...}), aliasName=null, concessionInfo=null, contactDate=null, contactDetails=({contactDetail=, contactId=122827, contactType=H, delta=2}), contactPreference={correspondanceLevel=0, correspondanceLevelDescription=null, emailOpt=N, smsOpt=N}, deceasedFlag=N, dob=1952-07-29T00:00:00, firstContactDate=null, firstName=John, ...}
I'm mapping this using:
Map<String, Object> meta = (Map<String, Object>) JSON.deserializeUntyped(viewPersonValue);
To get firstname I'd say:
meta.get('firstName');
The issue I'm facing is accessing the values in addressDetails.
I've tried addressDetails[0] and addressDetails.addressId but I think I'm approaching this wrong.
Any help would be greatly appreciated.