I have a repeatable type with the API ID of "hero_images" and in it I have a lot of documents. I also have a single type with the API ID of "hero_section" and inside it I added several "hero_images" documents. I'd like to query prismic and obtain the "hero_images" that I added to "hero_section". The way I have this working currently is that I use the following:
When I retrieve the data from the "hero_section", I only get IDs for the "hero_images" that are added to it, and not the contents of the "hero_images". So I add all the ids to an array and then I use the following:
The "hero_images" are added to the "hero_section" as a links to the documents. So if I go to the Custom Types page in my dashboard, I can see the custom type "hero_images" which is of the "repeatable" type and it has 3 documents in it and those are grabbed and displayed inside "hero_section". The idea here is that at some point, the "hero_images" repeatable might have 10-15 images, but we only want 3 or 4 to be visible on the website so we only take the ones we want, put them in "hero_section" and then query that to grab the ones we would like to show.