I tried
participant = conferences[0].participants('participant')
but this always return a participant even though the participant is not in the conference.
participant = conferences[0].participants('participant').fetch()
returns an error if the participant is not in the conference
Try something like the below:
function findParticipant() {
return client.conferences('CFba9989...')
.participants
.list()
}
let findMe = 'Winston';
findParticipant()
.then(participants => {
let result = participants.filter(participant => participant.label === findMe )
console.log(result);
}).catch(err => console.log(err.message))