I have a JSON object and was wondering how I can iterate over the object to pull values for "id".
{
"totalSize": 5,
"done": true,
"records": [
{
"attributes": {
"type": "EventLogFile",
"url": "/services/data/v38.0/sobjects/EventLogFile/0AT1U000003kk7dWAA"
},
"Id": "0AT1U000003kk7dWAA"
},
{
"attributes": {
"type": "EventLogFile",
"url": "/services/data/v38.0/sobjects/EventLogFile/0AT1U000003kk7eWAA"
},
"Id": "0AT1U000003kk7eWAA"
I was trying something below.
sub_data = s["records"]["id"]
for i in sub_data:
print(sub_data['id'])