title: How to convert a Twig array into JavaScript array
body: <p>I have a Twig array and I want to send it to JavaScript:</p>
  
  <pre><code>&lt;script&gt;
      var packages = {{packages}}
  &lt;/script&gt;
  </code></pre>
  
  <blockquote>
    <p>Error! Array to String Conversion.</p>
  </blockquote>
  
  <p>How should I do that?</p>