I am using **"customer\_address\_save\_after"** event.

This is my observer code.

```
public function execute(\Magento\Framework\Event\Observer $observer)
{
    $address = $observer->getEvent()->getCustomerAddress();    
    echo $address->getCity();     
    echo $address->getStreet(0);
    die;
}

```

I am getting city value, but street is throwing me error.

How to get street line 1 and line 2, The above code throwing me fatal error when i am trying to update shipping address from customer account page.

I am getting error after using below code also

```
 echo $address->getStreet();

```

Below is my form post data

```
    Array
 (
[entity_id] => 381939
[increment_id] => 
[parent_id] => 46195
[created_at] => 2018-08-07 08:44:12
[updated_at] => 2018-09-03 10:35:33
[is_active] => 1
[city] => Hampton
[company] => Test
[country_id] => GB
[fax] => 
[firstname] => Test
[lastname] => test
[middlename] => 
[postcode] => UG 1JY
[prefix] => 
[region] => Surrey
[region_id] => 0
[street] => London
 street
[suffix] => 
[telephone] => 9898989898
[vat_id] => 
[vat_is_valid] => 
[vat_request_date] => 
[vat_request_id] => 
[vat_request_success] => 
[region_code] => Surrey
[id] => 381939
[customer_id] => 46195
[default_shipping] => 
[default_billing] => 
[is_default_billing] => 
[is_default_shipping] => 
)

```

I am getting below error,

uncaught error: Array to string conversion street in file