At Acme Analytics, an internal service returns REST API results as a JSON string. Write a function that parses the JSON response and returns the id values of all users whose active field is true.
Implement extract_active_user_ids(response).
response containing valid JSON.{"users": [ ... ]}id: integeractive: booleanusers field is missing or empty, return an empty list.id or active.Example 1
Input: response = '{"users": [{"id": 1, "active": true}, {"id": 2, "active": false}, {"id": 3, "active": true}]}'
Output: [1, 3]
Active users are the first and third entries.
Example 2
Input: response = '{"users": [{"id": 10}, {"id": 20, "active": true}, {"active": true}]}'
Output: [20]
Only the second object has both required fields and is active.
1 <= len(response) <= 10^5response is valid JSONusers contains at most 10^4 objectsid values are integers in the range [-10^9, 10^9]