title: Assign unserialize Laravel object to JS array
body: <p>I have serialize object returning from Controller to blade view in laravel like:</p>
  
  <pre><code>"a:3:{i:0;s:1:"2";i:1;s:1:"4";i:2;s:1:"6";}"
  </code></pre>
  
  <p>from my blade view I use this JS code block to get those value as array.</p>
  
  <pre><code>var branches = {{unserialize($preliminary-&gt;branches)}};
  </code></pre>
  
  <p>But in there I'm getting error saying </p>
  
  <blockquote>
    <p>expression expected</p>
  </blockquote>
  
  <p>any suggestions to solve this situation..?</p>