or maybe:

```python
ids = [obj['resource'] for obj in (datasets['objects'] or [])]
```