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
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!
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.
Thank you so much! I've been going crazy trying to figure this out, even exploring functions like `join()` and `append()`. This really helps!