title: how to create a cookie which can store list/Array
body: <p>In my current project I have to show a Popup(Welcome Info) every time he/she login to the site. In the Popup user have a option(Onclick CheckBox) to hide the Popup for 30days.</p>
  
  <p>I'm achieving this by saving a UserUniqueId to cookie(Which should be an array/list) when he/she click checkBox on popup. As Below</p>
  
  <pre><code>    var UniqueId = "xxx";
      var uIDCookies = [];
  
      // looping to get all the values that are stored in cookie 
      $.each($.cookie(), function(i, v) {
          uIDCookies.push(i);
      });
  
      // if current userUID not found in cookie then showing popup  
      if (($.inArray(UniqueId, uIDCookies)) === -1) {
          //show popup
      } else {
          // hide popup
      }
  
      // create cookie and set expire time 
      $('.checkBox').on('click', function () {
              var date = new Date();
              var minutes = 3;
              date.setTime(date.getTime() + (minutes * 60 * 1000));
              $.cookie(UniqueId,  { expires: date, path: '/' });
              //hide popup
      });
  </code></pre>
  
  <p>No matter what I'm looping through all cookie values that are stored on client browser so, I feel that there could be a better way to achieve this. Suggestions Please..!! </p>