// JSON object to hold the information, which is sent to the server JSONObject jsonObjSend = new JSONObject(); jsonObjSend.put("action", "myAction"); jsonObjSend.put("type", tipo);
So far so good, but if I want to add
jsonObjSend.put("elementi", arrayOfElements);
where arrayOf Elements should be an array of strings. How can i do
/ ** EDIT
EXAMPLE WHAT NEEDS
{ "action": "myAction", "type": "elementi", "elementi": [ "3287498357", "23472857" ] }
source share