How to leave the first letter in a word

The node gets names of different lengths. For example, Vanessa, Mike, Bob. How do I trim a word so that the first letter remains?

Vanessa > V
Mike > M
Bob > B

It looks like your topic is missing some important information. Could you provide the following if applicable.

  • n8n version:
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app):
  • Operating system:

In javascript you can simply use a [indexNumber] after a field to access the characters by a number as if it’s an array.

So just use this {{ $json.fieldName[0] }} and of course change “fieldName” to your field


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.