Members Loop Output

Good evening, all!

I am having a hard time modifying the members-loop output.

Essentially, I want to check the value of a profile field and output fields based on that value.

Here's what I was trying, but it's outputting everything regardless.

In the theme/members/members-loop.php file, there's a section where you can output additional fields.

Is there a function that gets the raw value versus the echo, as bp_member_profile_data( 'field=Member Type' ); seems to do?

Here's a quick look at what I'm doing.

/*Set Up Stylist Data */
$type = bp_member_profile_data( 'field=Member Type' );
if ($type = 'Stylist'){
$salon = bp_member_profile_data( 'field=Stylist Salon Name');


if ($type = 'Stylist'){
echo $type. ' at ' .$salon;

You can see the output result here:

I appreciate any insight. I've been looking for a BP function list, but not having much luck.