Escaping special characters in Airscript

I’m using a 3rd party API, which has variable names that includes hyphens in the string. How do I escape special characters?

I’m exploring the Weather API, and would like to report the current air quality of a location. The variable is defined as us-epa-index

Hi @Tamzin_Atkins, trying to wrap my head around what you are trying to achieve here. Would you mind being more specific on the specific escaping you are trying to perform? Is it escaping the value you get from the API reply? If so can you give an example?

Thanks!

Sure thing! I’ve updated my original post to include a link to the particular API I’m using, along with a screenshot within Airkit Studio.

@Tamzin_Atkins - If I understand correctly, you would probably have to use the array index method:

"Air Quality: {{IF(result.current.air_quality[“us - epa - index”] = 6, “Extremely Dangerous”…

2 Likes

That works! Thank you.
image (4)

1 Like