mercredi 17 février 2021

Randomly group elements of array using React.JS

I have json file, from which I display the data:

data: [
{
name: "john"
},
{
name: "lora"
},
...
]

in total i have 16 names. what i want to do is to randomly group this array by 4 people, total 4 groups. what is the best way to do this using react.js?




Aucun commentaire:

Enregistrer un commentaire