Handling an API Array Response

Probably a well-known limitation now - from your experience, what’s the best approach to handling an API request that returns an array like this? The use case requires these tickers (stock symbols) to be dynamic, hence the response will be change each time

{
    "AAPL.US": [
        {
            "date": "2025-04-08",
            "count": 13,
            "normalized": 0.1594
        },
        {
            "date": "2025-04-07",
            "count": 32,
            "normalized": 0.0786
        }
    ],
    "TSLA.US": [
        {
            "date": "2025-04-08",
            "count": 21,
            "normalized": 0.3512
        },
        {
            "date": "2025-04-07",
            "count": 31,
            "normalized": 0.0772
        }
    ]
}

Yes a well known limitation
This is what we call a dictionnary of data, not an array (but you have an array inside the object)

Bubble doesn’t handle that directly. Search for dictionnary of data on forum to see some solutions.
You can use JSON plugins, a plugin that convert a dictionnaries (JSON Dictionaries Conversion Tool Plugin | Bubble), a server side script or third party tool…

1 Like

@Jici - Legend, thanks for clarifying the name, makes figuring out a solution much easier. I’ll probably write a server script to reformat the API response.

1 Like