title: How to make array in Jquery and pass it as hidden field value?
body: <p>I thought I can save data I get from data.result.public_id to an array. </p>
  
  <p>I get many public_ids and would like to pass all those ids as hidden field value, but first I need to save them to an array. I use Cloudinary service to store images. When I upload 5 images to Cloudinary I receive back 5 public_id. Every time image uploaded I want to store public_id to an array.  </p>
  
  <p>Then in the controller I map all the data in the array and save every public_id in the database.</p>
  
  <p>How to save public_id to an array?</p>
  
  <pre><code>&lt;input id="public_token" name="public_token" type="hidden" value="" /&gt;
  
  $(document).ready(function(){
    $('.cloudinary-fileupload').bind('cloudinarydone', function(e, data) {
    var public_id = [data.result.public_id];
    $("#public_token").val(public_id);
   });   
  });
  </code></pre>