Using a change node to change payload (or whatever string) to lowercase?

Using a change node to change payload (or whatever string) to lowercase? To error results:

What boneheaded thing am I forgetting?

try: $lowercase($$.payload)

EDIT:

There is also the test tab in the JSON editor:

can be very very useful (as opposed to being "just" useful!)

There are example of all theJSONata function in the change node editor or at JSONata Documentation · JSONata

I don't often install contrib nodes for things I know how to do in a function (or if I must, a change node+jsonata) but one I can definitely recommend for strings is node-red-contrib-string.

It's quite well thought out and quite extensive e.g:

When I need to code significantly... I use function nodes. But when it is a one-off, a one-liner, I tend to use a change node if applicable, easier to understand, especially when you share the flow to some one else. Not everyone is well versed in TypeScript or even JavaScript.

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