i need to compare 2 addresses(physical address and mailing address) and i converted javascript address objects into string using JSON.stringify(address) and then comparing but some times physical address or mailing address coming with suffix postal code.
for example physical address coming like this
{addressLine1: '999999 HAMILTON DRIVE', city: 'OLD LYME', state: 'CT', postalCode: '06371'}
and mailing address coming like this
{addressLine1: '999999 HAMILTON DRIVE', city: 'OLD LYME', state: 'CT', postalCode: '06371-1202', country: 'US'}
my Question is is it mandatory to compare postal code , can't we compare the US address with just street address , city and state ?
or we can split the psotal code and take off the suffix and then compare but are there any other ideas ?