How to limit the length of text in a string?

Hey!
How to limit the length of text in a string to the desired value, for example, 100 characters?

Try $node["Switch"].json["h1_type"].slice(0, 100)

1 Like

Thank you Ricardo!
It worked!