Hello Team,
I am getting Json like format from my API. In that I need to create couple of list and property list using repeat loop.
Below code I tried using this i can able genrate the required list.
But how to genrated the property list inside the repeated loop? so that I can use for later validation
put [{“name”:“Test1”,“Age”:20,“depat”:“Eng”,“Loc”:“COB”,“Type”:“H”},{“name”:“Test2”,“Age”:30,“depat”:“Phy”,“Loc”:“KOR”,“Type”:“M”},{“name”:“Test3”,“Age”:25,“depat”:“Che”,“Loc”:“PUN”,“Type”:“S”}] into Test_list
log Test_list
set the listInsertionMode to “nested”
repeat with each item of Test_list
put it into inner_value
repeat with each item of inner_value
insert it.name into name
insert it.Age into Age
insert it.depat into depat
insert it.Loc into Loc
insert it.Type into Type
nsert “”&singlequote&it.rgrId&&singlequote&“:”&singlequote&it.rtyDesc&singlequote into Test
end repeat
end repeat
log name
log Age
log Loc
log Type
log “-----------------”
log Test
log “-----------------”
My excepectation of Test result should be:
{“Test1”:20,“Test2”:30,“Test3”:25,}