title: Octobercms problem with .csv import/export on repeater fields
body: <p>I have a <em>customer</em> table and model using some <a href="https://octobercms.com/docs/backend/forms#widget-repeater" rel="nofollow noreferrer">repeater fields</a> for <strong>phones</strong>, <strong>mails</strong> and <strong>addresses</strong>. </p>
  
  <p>I use Import Export behavior. </p>
  
  <p>I get "<em>Array to string conversion</em>" error if I don't use <em>json_encode</em> to export data:</p>
  
  <pre><code>namespace MyCompany\MyPlugin\Models;
  
  use Model;
  use Backend\Models\ExportModel;
  use MyCompany\MyPlugin\Models\Customer;
  
  class ExportCustomer extends \Backend\Models\ExportModel {
  
  public function exportData($columns, $sessionKey = null) {
      $customers = Customer::all();
  
      $customers-&gt;each(function($customer) use ($columns) {
          foreach ($columns as $column) {
              if (is_array($customer-&gt;$column)) {
                  $customer-&gt;$column = json_encode($customer-&gt;$column);
              }
              $customer-&gt;addVisible($column);
          }
      });
  
      return $customers-&gt;toArray();
      }
  
  }
  </code></pre>
  
  <p>But this way the resulting .<em>csv</em> is useless to my customer needs (he needs to <strong>manually edit it before uploading it</strong> in order to populate the backend). </p>
  
  <p>EDIT: The goal is to have a prefixed column for each repeater field, so that my customer can edit easily, this way ("contact" is the repeater field):</p>
  
  <pre><code>| id | business_name | contact_1_name | contact_1_email | contact_1_mobile | contact_2_name | contact_2_email | contact_2_mobile | contact_3_name | contact_3_email | contact_3_mobile | ...
  </code></pre>
  
  <p>The data in my "<em>contacts</em>" column are json_encoded, indeed:</p>
  
  <pre><code>[{"name":"Eric Lucas","surname":"Riddle","role":"Manager","phone":"+1 (989) 305-8603","cellphone":"+1 (298) 758-1686","email":"calyqev@mailinator.com","linkedin":"mylinkedin"}]
  </code></pre>
  
  <p>Nonetheless, if I edit it and try to import it via the ImportCustomers model, I fill all the json_encoded tables with escaped data and I can't retrieve it on my view. The other fields are displayed correctly. </p>
  
  <pre><code>class ImportCustomer extends \Backend\Models\ImportModel
  {
      public $rules = [];
  
      public function importData($results, $sessionKey = null)    {
  
          foreach ($results as $row =&gt; $data) {
  
              try {
                  $customer = new Customer;
                  $customer-&gt;fill($data);
                  $customer-&gt;save();
  
                  $this-&gt;logCreated();
              }
              catch (\Exception $ex) {
                  $this-&gt;logError($row, $ex-&gt;getMessage());
              }
  
          }
      }
  }
  </code></pre>
  
  <p>Any ideas on how to manage repeater fields?</p>