Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

Get array count and loop trough options

Alopez
2012-06-29
2013-05-28
  • Alopez
    Alopez
    2012-06-29

    Hi All,

    Need to get the count and loop trough an Reporting array.
    Have a 'GroupReportsCOM' array where each report identified by id_app_report which contains Parameters in array as ReportParametersCOM.

    This my code:

    [{ 'item_text':'Upload doc',
       'id_report_group':'7',
       'GroupReportsCOM': [ {'id_app_report':'9',
                                                'ReportParametersCOM': [ {'rep_item':'company','value':'TESTONE'},
                                                                       {'rep_item':'company_name','value':'Testing one'},
                                                   {'rep_item':'getal','value':'1'} 
                                                ] 
                            } ,
                            {'id_app_report':'10',
                             'ReportParametersCOM': [ {'rep_item':'company','value':'TESTTWO'},
                                                                            {'rep_item':'company_name','value':'Test two'},
                                                     {'rep_item':'getal','value':'2'} 
                                                      ] 
                            } 
                          ] 
    }]
    

    Any hint or help will be much appreciated.

    Thx.

    Anibal