I have below Json payload.
{
“listitemscount”: “2”,
“listitems”: “[\" 8080,2,Test,Two,712-222-1112,san2@test.com,Associations,Fall Region Meeting / Réunion du comité régional – anme,QC,1119-10-28,to the delegate / au délégué,122,fgv,1222,830.960000000000,dfd,4795188,Quebec,these are comments,952.960000000000","0fd4efc0 (2).jpg,https://abc.sharepoint.com/sites/Main_and_Sub/Lists/Dee Ep Form/Attachments/8080/0fd4efc0 (2).jpg","travel thoughts2.pdf,https://abc.sharepoint.com/sites/Main_and_Sub/Lists/Dee Ep Form/Attachments/8080/travel thoughts2.pdf",\" 9850,2,Kate,R,1138666061,kate_r@test.ca,Access Limited,Fall Region Meeting / Réunion du comité régional – anme,SK,1911-12-02,to the delegate / au délégué,100,100,fgv,0,830.960000,4711188,Alberta,200.000000000000","Christmas invite.pdf,https://abc.sharepoint.com/sites/Main_and_Sub/Lists/Dee Ep Form/Attachments/9850/Christmas invite.pdf","Mileage for region meeting travel.pdf,https://abc.sharepoint.com/sites/Main_and_Sub/Lists/Dee Ep Form/Attachments/9850/Mileage for region meeting travel.pdf"]”
}
I need to parse this payload and do below:
- Run the outer loop for listitemscount
- run the inner loop for attachmentscount in that loop. Attachments count is the second value under key - listitems. First one is list item
- as per the attachments count, after column value 20, there are further columns which are dynamic. there will be 2 columns(display name of attachment, attachment url) per attachment. So, in this case, attachments count =2, hence, after column 20, there are 4 more columns.
- i need to download those attachments in local.
Regards
Sonali





