listConnect = [ { "participant": { "name": "Henk", "email": "[email protected]" }, "ticket": { "name": "Haar" "email": "[email protected]" } }, { "participant": { "name": "Henk", "email": "[email protected]" }, "ticket": { "name": "Haar" "email": "[email protected]" } } ]
participantsList -> remove empty participants -> emptiedParticipantList -> loop
usedParticipantList = emptiedParticipantList (met) each (p) -> maak tijdelijk lijstje van usedParticipantList zonder de huidige participant maak een object 'connect' = { "participant": { "name": "Henk", "email": "[email protected]" }, // PAK RANDOM TICKET VAN usedParticipantList // Kijk of used!=true "ticket": { "name": "Boyd", "email": "[email protected]" } // else reroll(); -> }