'How to concatenate 2 values in StringBody in Gatling version 3.5.0

I need to concatenate 2 variables in StringBody in a Gatling script. If I type only one value for example:

"code":"${executionRef}",
"name":"${Groups}",

that works. But I need to concatenate them in only one value. I have tried it in many ways but the scripts fails. Some of my attempts:

enter image description here

enter image description here

enter image description here

enter image description here

enter image description here

enter image description here

enter image description here

enter image description here

enter image description here



Solution 1:[1]

"""{
  "code":"#{Groups}-$#{executionRef}"
}"""

Note: using the new #{} syntax introduced in Gatling 3.7, where old ${} is deprecated

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Stéphane LANDELLE