I have a JSON Object in The Form
{"pageId":1,"stgId":1,"userId":2,"requestStageId":0,"requestPageId":0,"answer":[{"qId":"6","ansValue":"1"},{"qId":"11","ansValue":"10"}]}
I receive the data as :
long uid = (long)inputJsonObj.get("userId");
long stgid = (long)inputJsonObj.get("stgId");
long pgid = (long)inputJsonObj.get("pageId");
JSONArray answer_Array = (JSONArray) inputJsonObj.get("answer");
ie, answer_Array conatins :
[{"qId":"6","ansValue":"1"},{"qId":"11","ansValue":"10"}]
Now I need To Convert the JSONArray answer_Array To LinkedHashMap, where qid will be the key and ansValue will be the Value.
How can This be done ?