Expanding data in a contact property in email using HUBL

I’m struggling to get values from a contact property into a HUBL variable. What I want to do is something like the code below (taken from Accounts Dashboard | HubSpot).

but rather than expanding a fixed list, I would like to assign a contact property to the variable - e.g. contact.my_property. This doesn’t seem to work - can anyone show me how.

If you can’t assign a contact property to a variable, is there another way of splitting up or only displaying part of a contact property in an email using HUBL?

Thanks

Mike

{% set string_to_split = "Stephen; David; Cait; Nancy; Mike; Joe; Niall; Tim; Amanda" %}
{% set names = string_to_split|split(';', 4) %}
<ul>{% for name in names %}
<li>{{ name }}</li>{% endfor %}
</ul>

@mikemaynard

A contact property is a variable. You should be able to apply the filter directly to contact.property

{% for property in contact.property|split(';', 4) %}

{% endfor %}

provided that the filter is appropriate to apply to that specific property. But also you shouldn’t have an issue assigning it to a variable:

{% set prop = contact.property %}

Provided that the property exists.

This might be a dumb question but have you considered that Hubspot needs to recognize you (the user) as a contact in order for the contact variable to take effect? If your not a contact in your account then Hubspot wouldn’t recognize you and so the contact variable would not work correctly.