[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Ftpapi] YAJL -



I am able to read the information within the ‘data’ with the code below.  My issue is the ‘extras’ is a data structure within the ‘data’ data structure. 

 

I have tired to access the information via result.list.extras(i) and that does not work. 

 

Do I need to change ‘node’ and ‘list’?

 

Thanks for any help.

 

node = YAJL_object_find(docNode: 'message');    

result.message = YAJL_get_string(node);         

                                                 

list = YAJL_object_find(docNode: 'data');       

                                                 

i = 0;                                          

dow YAJL_ARRAY_LOOP( list: i: node );           

  j = 0;                                        

  Dow YAJL_OBJECT_LOOP( node: j: key: val);     

     exsr load_data;                            

  enddo;                                        

enddo;               

 

Begsr load_data;                                             

 // Use this bring in the fields we need from the Json file  

 // -------------------------------------------------------  

                                                              

 select;                                                     

 when key = 'id';                                             

   Result.list(i).id = yajl_get_string(val);                 

   idsave  = result.list(i).id;                              

 when key = 'referenceId';                                   

   Result.list(i).id = yajl_get_string(val);                  

   refidsave  = result.list(i).id;                           

 when key = 'extras';                                        

 endsl;                                                      

Endsr;                                                                                   

 

Georgeann Rybak

 

Software Engineer, Information Technology

The American Registry Of Radiologic Technologists®

 

Direct Phone & Fax 651.681.3133 | Main Phone 651.687.0048

1255 Northland Drive, St. Paul, MN 55120

arrt.org

 

 

               

-- 
_______________________________________________
Ftpapi mailing list
Ftpapi@xxxxxxxxxxxxxxxxxxxxxx
http://scottklement.com/mailman/listinfo/ftpapi