Create dynamic page using strapi

In the above screenshot, banner_content and carousel_data are collections for components that I created in React. there are going to be hundreds of such collections which I want to add a reference to in strapi in a similar way I have added for banner_content and carousel-data. while creating an entry for the above collection. I have to repeat propcomponent as there could be multiple carousel data in the page schema.

This way i am able to add multiple carousels or banners in single page but issue is when i get the response from strapi it contains empty response of carouseldata in first component and empty banner content in second component

is there any way i can ignore or not get rid of empty data in API response

This article explains how populating works

Also if you don’t want to write it by hand you can use the following plugin but you need to enable the auto-populate setting. and then populating notting.

or a 3rd option is

Note that this will lead to performance issues in production since it populates a lot more invisible things you can’t see.