Array is empty when it is accepted by API – Javascript
I have FormData object to which I set an array of integers. document.querySelectorAll("input[name="genre"]:checked").forEach((e)=> genres.push(+e.value)); console.log(typeof(genres[0])); //number if (genres.length > 0) { formData.set("genreFilters", JSON.stringify(genres)); } I am sending this FormData object by fetch() to my ASP.NET API fetch("/list", { method: "POST",…