Mapping contents using API in module 2

On making request to the API in module 2, the API is returning an array of object for each symbol.
So how can we map the value. Wouldn’t it be a 2D array?

You need to work on each symbol by creating a loop. Work symbol by symbol for each symbol in supplied trades.

I hope this helps!

Hey why are you posting screenshot of your method as @shoryajain mentioned you have to run a loop for each symbol so try to do in that manner.

that is what I have done sir. That’s why I posted the screenshot.

I ran a loop for each symbol, but for each symbol I am getting an array of objects.
So won’t that create a 2d array.
like : googl - [{},{},.{}]
appl - [{},{},{}]

Hey @17ucc018 obviusly you have to extract value according from that data for that you need to perform preprocessing on that data so better to do that why are you making a task when it can be solved by some simple methods.


Sir this is what the API calls are returning for a single symbol.
So how would I map this data for multiple symbols. As Candle can only to one of these as arrays.
Should I extract the first index only or what?
Please just let me know this.

Basically I just want to confirm will it be a list of arrays?

obviously i can not tell you solution but you have to extract closeVal at endDate right so perform required logic to extract that, endDate will be the last date in the json returning response

that’s what i wanted to ask sir, that which endDate we need to consider as multiple are returned. Thanks.