Multiple API calls triggered by different buttons within the same visualization

I have two different api triggers calling the same api but use different production environments. Is there a way for me to house the responses within the same json explorer? Essentially have two api calls from two buttons point at the same json explorer

So for example, someone could press " non narrative matches api" or "matches api" and whichever was more recent would populate the json explorer (instead of having two: "narrative matches results" and "non narrative matches results"

Hello,

You can use temporarily state to store the last ran API. In the recording below, I have a single temp state variable. The JSON explorer is display the value from temp state variable. Each button set a different result into the temp state variable in turn display in the json explorer.

temp state

attached test app:
temp state.json (10.5 KB)

Hope that helps,

1 Like