I have a JSONArray with JSONObjects , i want the find a JSONObject based on condition and update it . Consider my json as below
ManagerArr = [
{
name : "Ram",
employees: ["Shyam","bhavya"]
},
{
name: "Ramya",
employees: ["Keerthi", "suresh"]
}
I want to update above array when i get new list of employees, i have to find the json object by validating manager name and then add them to employees array. i can iterate on whole jsonArray for every new employee, but do we have any in-built method to do so. i don't want to iterate the whole array every time, can i get the index of JSONObject in JSONArray by any chance