Returning an id

I am having a difficult time trying to figure out why my function can’t seem to return a specific id.
I am trying to create a function that returns a team member’s id rather than the whole body response
Here is my code:

import { bookingsApi } from "../utils/square-client.js";
async function listTeamMember() {
    try {
        const response = await bookingsApi.listTeamMemberBookingProfiles();
        return (response.team_member_id);
    } catch (error) {
        console.log(error);
    }
}
listTeamMember();

:wave: It’s nested in the teamMemberBookingProfiles. For example:

console.log(response.result.teamMemberBookingProfiles[0].teamMemberId);

:slightly_smiling_face:

Awesome! Thank you for the help.