How can I iterate through all the key and value of configuration object I have an admin setting form (Configuration form) called 'example.settings'. I can load the configuration using below code.


  $config = \Drupal::config('example.settings');


Is there a way to iterate through and get all the configuration values in this config 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)