title: ChartJS + twig symfony
body: <p>I've got an issue, I'm trying to create a chart (pie) with ChartJS using twig data. </p>
  
  <p>The chart label uses an array, so I'm giving a twig array to it like this : </p>
  
  <pre><code>var myChart = new Chart(ctx, {
      type: 'pie',
      data: {
          labels: ({{array|json_encode()|raw}})
  </code></pre>
  
  <p>But it displays "object Object". For my purpose I want to display an attribute of that object, in that example : "intitule"</p>
  
  <p><a href="https://i.stack.imgur.com/gezPw.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/gezPw.png" alt="My array"></a></p>
  
  <p>Thanks a lot.</p>