Syntax for using getValue to get value in an array I created a form for a block plugin. I'm attempting to save the values to the form after submitting. However I'm having trouble saving the values if they are within an array.

For instance 

public function blockForm($form, FormStateInterface $form_state){
    $form['plugins_string_text'] = array(
      '#type' =&gt; 'text_format',
      '#title' =&gt; $this-&gt;t('Block contents'),
      '#format' =&gt; 'full_html',
      '#description' =&gt; $this-&gt;t('This text will appear in the block.'),
      '#default_value' =&gt; $this-&gt;configuration['plugins_string_text-submit'],
    );

    $form['header']['margin-top'] = array(
        '#type' =&gt; 'textfield',
        '#title' =&gt; t('Margin Top (pixels)'),
        '#default_value' =&gt; $this-&gt;configuration['header']['margin-top-submit'],
        );
    $form['header']['margin-bottom'] = array(
        '#type' =&gt; 'textfield',
        '#title' =&gt; t('Margin Bottom (pixels)'),
        '#default_value' =&gt; $this-&gt;configuration['header']['margin-bottom-submit'],
        );
    $form['header']['margin-left'] = array(
        '#type' =&gt; 'textfield',
        '#title' =&gt; t('Margin Left (pixels)'),
        '#default_value' =&gt; $this-&gt;configuration['header']['margin-left-submit'],
        );
    $form['header']['margin-right'] = array(
        '#type' =&gt; 'textfield',
        '#title' =&gt; t('Margin Right (pixels)'),
        '#default_value' =&gt; $this-&gt;configuration['header']['margin-right-submit'],
        );
}

    public function blockSubmit($form, FormStateInterface $form_state) {
        $this-&gt;configuration['plugins_string_text-submit']  = $form_state-&gt;getValue('plugins_string_text');
        $this-&gt;configuration['header']['margin-top-submit'] = $form_state-&gt;getValue('header','margin-top');
        $this-&gt;configuration['header']['margin-bottom-submit'] = $form_state-&gt;getValue('header','margin-bottom');
        $this-&gt;configuration['header']['margin-right-submit'] = $form_state-&gt;getValue('header','margin-right');
        $this-&gt;configuration['header']['margin-left-submit'] = $form_state-&gt;getValue('header','margin-left');
}


This is saved to the form properly          

$this-&gt;configuration['plugins_string_text-submit']  = $form_state-&gt;getValue('plugins_string_text');


However each of the lines below display the entirety of the 'header' array instead of the individual margin values.

$this-&gt;configuration['header']['margin-top-submit'] = $form_state-&gt;getValue('header','margin-top');
$this-&gt;configuration['header']['margin-bottom-submit'] = $form_state-&gt;getValue('header','margin-bottom');
$this-&gt;configuration['header']['margin-right-submit'] = $form_state-&gt;getValue('header','margin-right');
$this-&gt;configuration['header']['margin-left-submit'] = $form_state-&gt;getValue('header','margin-left');


What is the proper way to use getValue to reach an element within an array. Or is there another function I should be using?
Put the keys in an array, for example:

$this-&gt;configuration['header']['margin-top-submit'] = $form_state-&gt;getValue(['header','margin-top']);