How to trim "Surname" text (remove all characters except the 1st one) and display "S." only
Options
Anna Sho
Member ✭
I need to return trimmed surname in endpoint.
Ive tried to search documentation but I haven't found exact solution for my case.
Thank you
Ive tried to search documentation but I haven't found exact solution for my case.
Thank you
Comments
-
I might combine a couple filters. First, split - you can take your text string and transform it to an array. Likely use a space as a separator. Secondly, the filter last to return the last entry of the array which would be the last name.
[CleanShot 2022-02-07 at 16.59.28.png]
If you are comfortable with Regex you may also consider leveraging that
Categories
- All Categories
- 53 ? Announcements
- 47 ? Releases
- 37 ? Welcome
- 983 ? Help! I'm a Noob
- 125 ? No-Code Front-Ends
- 633 ? Working with APIs
- 439 ? Transforming data
- 126 ? Connect Xano to ...
- 50 ?? Find an Expert
- 348 ❓Other questions
- 35 ? Security
- 22 ✂️ Snippets
- 19 ? Showcase
- 7 ?️ Xano Chatter
- 62 ? Video Tutorials
- 171 ? Request a feature
- 229 ? Report a Bug
- 19 ? Templates & Extensions
- 7 ? Feedback