Filedropzone to map fields of csv, which column has emailaddress, and is there a header, plus preview

I'm hoping for some guidance here, a little out of my depth here, but looking to have a filedropzone, where a user drops or selects a file, the button would trigger a (popup?) for confirmation which column contains the emailadress and if the first row contains a header.

I am assuming that I can use the next query to update with those inputs into this script:

function csvToJson(csvString) {
const lines = csvString.split('\n');
const headers = lines[0].split(',');
return lines.slice(1).map(line => {
const values = line.split(',');
return headers.reduce((row, header, index) => ({
...row,
[header.trim()]: values[index].trim() // trim to remove any leading/trailing spaces
}), {});
});
}

Hey @Michael_Rockwell! Would you mind sharing some screenshots of your current setup?

For the pop-up, I added an event handler to the file input component to open a Modal component. In the Modal component, I set the Hidden property to true so the Modal button isn't actually visible on the app anywhere.

For the code section, what is your goal and what value are you inputting into the function? Are you parsing the inputted files?

If so, you get access to fileDropzone1.parsedValue, which has the CSV's parsed headers and values.

Let me know how I can help!