Fetch nested objects

System Information
  • Strapi Version: 3.3.4
  • Operating System: Windows 10
  • Database: SQLite
  • Node Version: 12.18.3
  • NPM Version: 6.14.5
  • Yarn Version: null

Greetings Strapi community,

I’m new to strapi, and I’m building a portfolio website with React in the frontend.

I have created 2 content-types: Illustrations and Categories
Each category has many illustrations

"id": 1,
"name": "Covers",
"published_at": "2020-12-15T09:52:17.189Z",
"created_at": "2020-12-15T09:52:12.372Z",
"updated_at": "2020-12-15T09:52:17.224Z",
"illustrations": [
"id": 2,
"title": "Handmaid's Tale Fanart Poster",
"description": null,
"category": 1,
"published_at": "2020-12-15T20:44:49.415Z",
"created_at": "2020-12-15T20:44:38.234Z",
"updated_at": "2020-12-15T20:51:57.113Z",
"media": {}
"id": 3,
"title": "Jane Eyre Book Cover",
"description": null,
"category": 1,
"published_at": "2020-12-15T20:45:10.676Z",
"created_at": "2020-12-15T20:45:07.189Z",
"updated_at": "2020-12-15T20:52:16.582Z",
"media": {}

With react I’m trying to fetch the illustrations of each category but it seems like Strapi allows only one level down for nested data. So my question is how to access those illustrations?

Did you mean accessing illustrations.media? Since you already have the illustrations in the category based on the code you shared above.