title: sending array in cookie using express is not working
body: <p>I am currently working on a project, where I need to give the user an array. For that, I am trying to use the res.cookie() function. However, whenever I try to give the user an array as cookie data, the browser gets the data as a string (also adding a &quot;j&quot; that i cannot understand).</p>
  <p>backend code:</p>
  <pre><code>homepageRouter.get('/',(req,res) =&gt; {
  res.cookie(&quot;likedProjects&quot;, &quot;checkstring&quot;);
  res.cookie(&quot;supportedProjects&quot;, [2500,4,6]);
  res.sendFile('/pages/homepage.html',{root:rootDir});    
  </code></pre>
  <p>});</p>
  <p>The &quot;checkstring&quot; works just fine but when I look at the second cookie its data comes off as a string:</p>
  <pre><code>j:[2500,4,6]
  </code></pre>
  <p>Is there a way to ensure that the cookie data will be received in the browser as an array?</p>