So i have this array of errorcodes
"codes": [ 597, 197, 120, 113 ]
that I'm trying to combine into one string with a delimiter of "-". I was hoping to try to use $join() but since it only accepts array of string, it will not work. Is there any workaround to join these integers or like convert it into an array of string instead?
Output that I'm looking for:
597-197-120-113
As you have pointed out, the $join function only works for an array of strings.
What you can do however, is transform the numbers array beforehand into a string array by using the $map function, which is shown as an example in its documentation.
outputs