How can I iterate through all the key and value of configuration object
You could try the following to get the raw values back:

$config-&gt;getRawData()


E.g. the following 

$config = \Drupal::config('system.maintenance');
$config-&gt;getRawData()


Returns and array of something like:
'message' => string(93) "@site is currently under maintenance. We should be back shortly. Thank you for y…"
'langcode' => "en"
→'_core' => array(1)