How to get indexof a specific element in list of objects

Hi,
i have response some like :
{
“user1@ex.com”: {
“name”: “Test account”,
“company”: “ABC”,
“phone”: “1234567890”,
“roles”: [
“Administrator”
],
“is_active”: true
},
“uesr2@ex.com”: {
“name”: “test account 02”,
“company”: “xyz”,
“phone”: “+911231231234”,
“roles”: [
“Administrator”,
“Manager”,
“Approver”,
“Creator”
],
“is_active”: false
},
“user03@xyz.com”: {
“name”: “test 03”,
“company”: “123”,
“phone”: “”,
“roles”: [ ],
“is_active”: true
}
}

i wand to find name === “test account 02” and indexof that user

Hi @rajitha15

It would help if we could see the actual response.
The one you have shared is malformed JSON and is not iterable.