I need to build a string from three variables separated with “-“. I tried to use $core_v2_utility.Join() following is the code snippet for the same:
#set($firstName = "John")
#set($surname = "Smith")
#set($age = "25")
#set($strarr = [$firstName, $surname, $ age])
#set($stringResponse = $core_v2_utility.Join("-", $core_v2_utility.MakeList($strarr)))
$stringResponse ## Displays result
I am expecting output string as "John-Smith-25", but I am getting empty value.
Can you please let me know what modifications should be needed in the code above to build the expected string.