How to Concatenate Strings in JSONata for State Machines?

0
6
Asked By CuriousCoder92 On

I'm really excited about the new JSONata support in State Machines, especially the use of variables—it's a total game changer! However, I'm struggling to figure out how to concatenate strings or include a variable within a string. I've tried searching online, but I can't find any useful information. Does anyone have any tips or insights on how to do this?

1 Answer

Answered By StringSlinger77 On

You can use the `&` operator to concatenate strings in JSONata. For example, you can format your string like this: `{ '% hi I am ' & $name & $last_name % }`. This should help you include your variables properly!

HelpSeeker21 -

Thank you so much! I've been going crazy trying to figure this out, even exploring functions like `join()` and `append()`. This really helps!

TechieTom -

By the way, do you know any good AIs for working with JSONata and Step Functions? I've got a bunch of JSONPath state machines, and it's proving tough to migrate them.

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.