Forum Discussion

Shweta_M's avatar
Shweta_M
New Contributor
4 years ago
Solved

Use dynamic index in holder

I have a scenario where 1 API returns list response. Response attached for reference. I need to fetch values of subscriberId, responseDate, device, manufacturer, plan, name for each subscriber and a...
  • HimanshuTayal's avatar
    4 years ago

    Shweta_M :

     

    That i in you for loop didn't work like you have written, please use as below :

     

    for(int i=1; i<=subscriberListSize; i++){
    	log.info i
    	subscriberId = holder["//*:subscriberInfo"+i.toString()+"/*:basicInfo/*:subscriberId"].toString()
    	log.info subscriberId
    }