I have jsonArray as follows
JSONArray childern as
[{"id":2,"label":"w","remoId":135},
{"id":3,"childern":null,"loc":146,"label":"Loc-w"},
{"id":4,"childern":null,"loc":147,"label":"Loc-newjk"}
]
i want to change childern key of JSONObject having id=3 to childernArray where
childernArray is [{"id":6,"label":"w"},{"id":7,"label":"w"}]
I want following output
[{"id":2,"label":"w","remoId":135},
{"id":3,
"childern":[{"id":6,"label":"w"},
{"id":7,"label":"w"}],
"loc":146,"label":"Loc-w"},
{"id":4,"childern":null,"loc":147,"label":"Loc-newjk"}]
How can i do this??