Hi Makers,
I’m experimenting with creating a custom module (App) that consumes the Alpha Vantage API.
The API’s “Intraday” time series route returns its data points as structure of nested collections - here’s a link to their demo call. I’m not a fan of how they’re structuring the response for this route because
- Each data point is structured identically, so I think they should have been returned as an array of collections rather than a nested set of collections.
- They’ve assigned each sub-collection a key containing the date/time of the data point - I think it would have been better to return “dateTime”: “2022-07-14 18:45:00”.
I’d like to abstract away these idiosyncrasies in my module to make the data easier to consume in downstream modules. Ideally I’m trying to make the module return one bundle containing a collection for the metadata returned from the route and an array of collections containing the time series data points’ dateTime, open, high, low, close, and volume.
I tried working in the Interface tab of the module, and also played around with the “output” setting in Communication. I also looked into the IML function toArray but couldn’t figure out where I might inject this to turn the time series nested collection into an array of collections.
It would be great if you could point me in the right direction for how to solve this!
Thank you!
John