Split using Website Text

Hello! I have a snippet that grabs a first and last name on a site and I'd like to split so that it just shows the first name. Here is the snippet that pulls first and last:

Hi {site: text; selector=.title > .name},

So it will display "John Smith" and I'd like for it to display "John". Any help is appreciated. Thank you!

Hi Logan,
Try {=split({site: text; selector=.title > .name}, " ")[1]}

Thank you so much, Dan! You actually showed this to me on our call but I couldn't figure out the exact syntax for this one. Really appreciate it!

1 Like

Hi @log62000

Dan's suggestion is a perfect fit, but if you'd like to learn a few more tricks on how to manipulate content, I suggest checking out the recording of the Advanced Masterclass we had last week.

Here's the link to the page with the video and all of the snippets I featured in the class: Masterclass Notes

And of course, if you have any questions, ask away! :slight_smile:

Yes! I remember this on the masterclass call which was awesome btw thank you for doing that! Y'all are so helpful. Really appreciate it!