title: Antd design table column -> how to pass array of objects to dataIndex
body: <p>I'm fetching object (contract) from DB, it contains few fields, one of them is an array of objects (products). I have <strong>antd</strong> table with column Products and I would like to fill it with product names.
  For example, my contract object also has account object, and the way I use dataIndex there is like this:</p>
  <pre><code>
  {
      title: 'Account',
      dataIndex: ['account', 'name'],
      key: 'account',
      align: 'center',
      sorter: (a, b) =&gt; a.length - b.length
  }
  
  </code></pre>
  <p>That works fine! But Account is not an array.</p>
  <p>Here is code with issue:</p>
  <pre><code>
  {
      title: 'Products',
      dataIndex: ['products'],
      key: 'products',
      align: 'center',
      filters: []
  }
  
  </code></pre>
  <p>Here is how I map data that is send to component above which has to fill table:</p>
  <pre><code>
      return data.map((contract) =&gt; ({
                  key: contract._id,
                  account: contract.account,
                  products: [contract.products],
              }));
  
  </code></pre>
  <p>I tried returning just contract.products, tried returning <code>Object.values(contract.products)</code>, tried to <code>JSON.stringify(contract.products)</code> but then I don't know how to parse it in column and take just name...
  The only way I managed to set name was by not sending object. Example:</p>
  <pre><code>
      return data.map((contract) =&gt; ({
                  key: contract._id,
                  account: contract.account,
                  products: contract.products.map(product =&gt; product.name),
              }));
  
  </code></pre>
  <p>This would indeed solve this problem, but it would made me make another asyncThunk method where I would return whole array of objects.</p>
  <p>Hope that I described that well,this is for my college project and it's bean bugging me whole day.
  I would be very grateful if someone knows how can I solve this.</p>