I have run one curl api using ansible shell module and got the below output. Now from the below output, i need to get only the third index from the data dictonary which has the key value pair ‘“password”: “zzz”’. How to retrieve it?
TASK [debug] ***************************************************************************************************************************************************************************
ok: [localhost] => {
“msg”: {
“code”: 0,
“data”: [
{
“password”: “xxx”,
“user_security_role”: “RO”,
“user_type”: “Standard”,
“username”: “test1”
},
{
“password”: “yyy”,
“user_security_role”: “RW”,
“user_type”: “Standard”,
“username”: “test2w”
},
{
“password”: “zzz”,
“user_security_role”: “SO”,
“user_type”: “Standard”,
“username”: “t3”
}
],
“message”: “success”
}
}