Extracting data from a batch request

Im working with linkedIn's API where i want to extract organization names from a list of organizations ID's that need to be dynamic. linkedIn is a bit tricky from my understanding and i need to first get organization ID's from 1 api request and pass them onto one that returns data on each as a batch request, my problem is creating the logic to iterate through the batch response and get the 'localizedName' value stored inside of each object.

So far ive tried things like a for each loop on the response but i keep getting an error that says 'not a numerically indexed array'

the paths look something like this: api2.response.result.results.12345.localizedName
where the number before .localizedName needs to be the dynamic value for each of the id's extracted in the first request.

creating a dynamic sub path seems to be my road block here.
Anyone know what functions i should use, also what term can use to refer to current item being iterated over?

3 replies