Skip to content

Instantly share code, notes, and snippets.

@jagdishlove
Created December 25, 2021 14:24
Show Gist options
  • Save jagdishlove/9573d741e2b843718b53e13f2f65680c to your computer and use it in GitHub Desktop.
Save jagdishlove/9573d741e2b843718b53e13f2f65680c to your computer and use it in GitHub Desktop.
//If we have an array where we need to find any value correspond to id which will be in same array so this we can use
function getMeetingTypeById(id) {
for (let i=0; i<modules.length; i++) {
for (let j=0; j<modules[i].exercises.length; j++) {
if (modules[i].exercises[j].id === id) {
return modules[i].exercises[j].meeting_type;
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment