I have this code which grabs all the input type from a form
const form = document.querySelector('form');
const data = new URLSearchParams(new FormData(form).entries());
My question is how to JSON.stringify the above data object? I need to stringify so that I can pass it through JQuery ajax to post the data.
If I loop it, it will print out below
for (let p of data) {
console.log(p);
}

console.log(data);?