My JsonArray is
[{
"Id": null,
"Name": "One New task",
"StartDate": "2010-02-03T05:30:00",
"EndDate": "2010-02-04T05:30:00",
"Duration": 1,
"DurationUnit": "d",
"PercentDone": 0,
"ManuallyScheduled": false,
"Priority": 1,
"parentId": 8,
"index": 0,
"depth": 3,
"checked": null },{
"Id": null,
"Name": "New task",
"StartDate": "2010-02-04T05:30:00",
"EndDate": "2010-02-04T05:30:00",
"Duration": 0,
"DurationUnit": "d",
"PercentDone": 0,
"ManuallyScheduled": false,
"Priority": 1,
"parentId": 8,
"index": 1,
"depth": 3,
"checked": null }]
Now from this JsonArray I want to remove Id, ManuallyScheduled, checked,
I tried using jsonArray.remove(1)
and also jsonArray.discard("Id")
in JAVA.
but nothing happens. what am I doing wrong to remove array items?
I am using JAVA as my technology.
JSONArray
and add aremoveData(String... keys)
method or something similar if this was something you wanted to do regularly. – Theophrastus