Unable to store value of an property or entity key in ConfigEntityType form
Try this one for saving config.


$config = Drupal::service('config.factory')-&gt;getEditable('my_module.settings');
$config-&gt;set('my_module.dsu_single_indexing_server',json_encode(array_unique($values)))-&gt;save();