{{ $json["nnnn"].slice(0,2)}} works in one workflow but not in another. Why?

I have a workflow where I use the function slice to take out part of the phone number:
{{ $json[“telefone”].slice(0,2)}}

I copied and pasted the node in another workflow and there it doesn’t works. Why?

Hey @fxholl,

My first thought is maybe Whatsapp isn’t a string, If you try {{ $json["Whatsapp"].toString().slice(0,2) }} does that work?

2 Likes

Thanks @Jon that did it!

2 Likes

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