2021年3月4日星期四

How to put Json object through loop

I want to loop through the questionnaires by using the for loop to set the value of the EMAIL_TO_CLIENT_IND.

The value inside the "path" is QUESTIONNAIRES/SUB_QUESTION/EMAIL_TO_CLIENT_IND. The first "if" is if the level path in JSON is just one Ex. "Questionnaires". And the "else" is for the path more than 1 Ex. "Questionnaires/Question".

My current idea is put the jObject.getJSONObject() inside the "else" for loop.

enter image description here

enter image description here

https://stackoverflow.com/questions/66450372/how-to-put-json-object-through-loop March 03, 2021 at 11:31AM

没有评论:

发表评论