+ Start a Discussion
Etienne Gaudry 5Etienne Gaudry 5 

Wrapper Access

Hi all,

I have a wrapper like this :
public class EU_API_DT_Wrap {
    public List<Competitions> Competitions;

    public class Competitions {
        public List<Sessions> Sessions;
    public class Sessions {
		public String DateSession;	

How can I access my sessions in my apex methods?
I tried :
EU_API_DT_Wrap myWrap = getSessionsList(saisonId, sportId);

for (EU_API_DT_Wrap.Competitions.Sessions ss : myWrap.Competitions.Sessions){

But it doesn't work.
I only manage to access the competitions like this :
EU_API_DT_Wrap myWrap = getSessionsList(saisonId, sportId);

        for (EU_API_DT_Wrap.Competitions comp : myWrap.Competitions){

Thanks for your help :)
ShirishaShirisha (Salesforce Developers) 
Hi Etienne,


Please go through the below document for the sample code which might be helpful:


Kindly mark it as best answer if it helps so that it can help others in the future.

Warm Regards,
Shirisha Pathuri