Hey guys,
So I have two dictionaries that look like this:
results = [
{'id': '1', 'message': 'Queue does not have minimum required number of members. Required at least 5 but found 4.', 'decision': 'Failed'},
{'id': '2', 'message': '', 'decision': ''}
]
metrics = {
'results': [{
'group': {
'id': '1'
},
'data': [{
'metrics': [{
'result': {
'count': 15
}
}]
}]
}, {
'group': {
'id': '2'
},
'data': [{
'metrics': [{
'results': {
'count': 0
}
}]
}]
}]
}
I want to update the 'results' dictionary with where the 'decision' : 'Failed' if count is less than 10 in the metrics dictionary for that id. I can't seem to find a elegant way to do this at all and it's driving me nuts