lambda/src/index.js
// Given a room name, returns the name of the coordinator for that room
Given a room name, returns the name of the coordinator for that room
Given a room name returns the name of the coordinator for that room
function findCoordinatorForRoom(responseJson, room) {
    console.log("finding coordinator for room: " + room);
    for (var i = 0; i < responseJson.length; i++) {
        var zone = responseJson[i];
        for (var j = 0; j < zone.members.length; j++) {
            var member = zone.members[j];
            if ((member.roomName != undefined) && (member.roomName.toLowerCase() == room.toLowerCase())) {
                return zone.coordinator.roomName;
            }
        }
    }
}
function findCoordinatorForRoom ( responseJson , room ) { console . log ( "finding coordinator for room: " + room ) ; for ( var i = 0 ; i < responseJson . length ; i ++ ) { var zone = responseJson [ i ] ; for ( var j = 0 ; j < zone . members . length ; j ++ ) { var member = zone . members [ j ] ; if ( ( member . roomName != undefined ) && ( member . roomName . toLowerCase ( ) == room . toLowerCase ( ) ) ) { return zone . coordinator . roomName ; } } } }
Given a room name, returns the name of the coordinator for that room
Given a room name returns the name of the coordinator for that room