**下面给出的代码是名为 home 的片段的架构字段,并且 home 有与其连接的片段,例如 _trip、_accomodation、_testimonial。这些连接的片段再次与其模式中的其他片段连接。因此使用检索主片段api/v1/home 连接件的内部连接显示为 id。
如何获取该 ID 的数据???**
{
name: '_trip',
label: 'Spotlight Trips',
limit:4,
type: 'joinByArray',
withType: 'trip',
},
{
name: '_accommodation',
label: 'Spotlight Accommodations',
type: 'joinByArray',
withType: 'accommodation',
limit:2,
},
{
name: '_testimonial',
label: 'Testimonials',
type: 'joinByArray',
withType: 'testimonial'
},
下面给出的 json 是检索数据的一部分。我想获取另一部分的住宿和旅行数据,但这里显示的是它的 id。
"_home-spotlight": [
{
"_id": "cki5owqrv008obgundta0x6rp",
"published": true,
"trash": false,
"type": "home-spotlight",
"title": "spotlightAbove",
"tripIds": [
"cki5oqi7r0063bgun81o6umqd"
],
"accommodationIds": [
"cki5owga1008mbgunlxweuera"
],