My API call returns different variables when the symbol parameter is changed. I think this is why I can’t make the API dynamic and show data for different symbols in a repeating group. I’m hoping someone can help me with an easy fix for this, but otherwise I may be forced to change the API data type to text from JSON and use regex to parse the coin id (which is all I need to pull the coin image file which is what I am aiming to do. The call is shown in the screenshots below:
These are two seperate calls made with two different coins (bitcoin and polygon). As you can see, the token symbol is infront of the returned id string (e.g. MATIC id vs BTC id). This means when I go to call the id, it will only work for the coin I initialised the API for. In the following case, the API only works for BTC because that is what the API was last initialised for. This is because the parameter description is BTC id and this doesnt match up to another coin (e.g. Ethereum would return ETH id as the parameter heading).
Does anyone know an easy fix for this? or is REGEX the only solution. I am unfamiliar with how to use REGEX so would like to use another method. Thanks