I already have the didOpen parameter built and implemented a JSON object with values inside of it.
The question is... How can I pass that JSON object to the then part of the Swal.fire({ }) .then arrow function
Swal.fire({
html: ` HERE IS ALL THE ID's STUFF `,
didOpen() {
let itemPOST = {
/* the json i trying to catch */ }
// do bunch of stuff and save it into itemPOST
} //==>end of didOpen
}).then(() => {
//console log here for itemPOST
})
the solution is to include some variable after the swal, pass the value to that variable and call it in the .then() arrow function