Formatting of string value stored in variable from custom action

Hi,

I am trying to executed a custom action to call an API and set some variable values and then calling skills-choice to print options with values from variables. Screenshot for reference.

image

The problem is that there is an “&” appearing in the value which I have set in variable.

image

My action’s code is like this.

return axios.get(apiUrl).then(res => {
      temp.category1 = res.data.items[0].snippet.title
      temp.category2 = res.data.items[1].snippet.title
      temp.category3 = res.data.items[2].snippet.title
    })

Hi @saurabh,

Have you tried logging with console.log() the 3 variables you’ve fetched from your remote API ? Maybe the & is returned as is by your API…

Hope this information helps,

François

Hi @frank_levasseur, thanks for the inputs.
I checked and found that it appears as & in the log but becomes & on the UI.