const role = [
{
name: 'Hitman'
},
{
name: 'Doctor'
},
{
name: 'Nurse'
}
]
This is my array of objects now this is my users
const user = ['James', 'Harden']
notice there are only two, so only two random roles will used from my array of objects now the result i want is
[
{
name: 'Hitman'
User: 'Harden'
},
{
name: 'Nurse'
User: 'James'
}
]
See, random user for a random role how can i do that?