I want to pass an array into an hidden input and be able to return it, but instead of doing this, the value is a string, as shown below :
Input :
<input type="hidden" name="LabelProduitInput" value=${labelProduitsArray}>
retrieve hidden input value and log it :
const labelProduitsArray = [product.fields.LabelProduitInput];
console.log(labelProduitsArray);
Result :
[ "BlaBla,BloBlo" ]
Now, i should split this string to have the result i want like so:
["BlaBla","BloBlo"]
Is there a way to directly return an array ?