This will generate one hidden tag for each element of the array. If you wish to replace this array with a javaScript array, you will have to create a loop and replace them one element at a time. Something like this: