iteration - Loop over List to fetch key & value pairs using Java -


this response receive:

[{rollno=1066276530, rollvalue=1815401000238}]  

this cast list<map<string, string>> leadids. want iterate these leadids key & value pairs. have tried in way, returning key "1066276530" , value "rollno", whereas expecting key "1066276530" , value "1815401000238".

here code

for (map<string, string> map : leadids) {     (map.entry<string, string> entry : map.entryset()) {         string rollno = string.valueof(entry.getvalue());         string rollvalue = string.valueof(entry.getkey());         log.info("[status search] roll no:" +rollno             + " roll value:" + rollvalue);     } } 

look @ log statement. have switched around number , id:

log.info("[status search] application id :"+applicationnumber+     " application number :"+appid); 

should be:

log.info("[status search] application id :"+appid+     " application number :"+applicationnumber); 

Comments

Popular posts from this blog

python - No exponential form of the z-axis in matplotlib-3D-plots -

php - Best Light server (Linux + Web server + Database) for Raspberry Pi -

c# - "Newtonsoft.Json.JsonSerializationException unable to find constructor to use for types" error when deserializing class -