Access Object Within Array In Javascript Functions And Events