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)

2 Likes

Thank you Ricardo!
It worked!