Iterate dataArray to create an object is not happening

How can I parse the incoming nomData data array and store those values into an object along with userEmail ? Somehow below code is not working, could someone pleas advise the issue here.

Expected database columns values:

var data = { useremail: userEmail, nomineeemail: email, nomineename: name, nomineeteam: team, reason: reason }

server.js

    app.post('/service/nominateperson', async (req, res) => {
        try {
            const userEmail = req.body.userEmail;
            const nomData = req.body.nomRegister;
            const formData = {
                useremail: userEmail,
                nomineeemail: {},
                nomineename: {},
                nomineeteam: {},
                reason: {}
            }
            const newArray = nomData.map(item => {
                formData.nomineeemail = item.email;
                formData.nomineename = item.name;
                formData.nomineeteam = item.team;
                formData.reason = item.reason;
            });
var data = { useremail: userEmail, nomineeemail: email, nomineename: name, nomineeteam: team, reason: reason } 
           // Ideally I should get nomData 
           //items parsed create an data object and pass that into bulkCreat() method: 
            const numberOfNominations = await NominationModel.count({where: {useremail: userEmail}});
            if (numberOfNominations <= 3) {
                const nominationData = await NominationModel.bulkCreate(data);
                res.status(200).json({message: "Nomination submitted successfully !"});
            } else {
                res.status(202).json({message: "Nomination limit exceeded, please try next week !"});
            }
    
        } catch (e) {
            res.status(500).json({fail: e.message});
        }
    });

enter image description here

Answer

So i assume nomData is an array containing multiple nominations. So if you want to bulkCreate with data you should pass an array instead of an object.

const data = nomData.map(item => ({
    useremail: userEmail,
    nomineeemail: item.email,
    nomineename: item.name,
    nomineeteam: item.team,
    reason: item.reason
}));
...
await NominationModel.bulkCreate(data)