Hello I am pretty new working with AWS and SF I am trying to send information and I need to check if the list of json I am checking the information. I have the next json list:
here...b'[{
"id": "xxxx",
"success": true,
"errors": []
},
{
"id": "yyyy",
"success": true,
"errors": []
}
]'
and in my lambda I do the next check:
response = requests.request("PATCH", url, headers=headers, data=body)
print('here...'+str(response.content))
if response.status_code == 200:
for iResult in response.content.b["success"]:
if iResult["success"] == false:
raise Exception('Error. Check SF size fields...')
I want to make sure that every 'success' in every json is equals to True. And if it is false to raise an Exception. So I made a loop to iterate over each json but the problem I have is that I do not know how to access the json correctly. What is confusing me is the " b' " in the json I print. Could anybody help me? Thanks