VL
Size: a a a
VL
LN
VL
VL
LN
YZ
YZ
LN
LN
YZ
LN
VL
LN
LN
VL
LN
KG
KG
🌠
return await this.audienceService.findAll({
include: [{
model: AudienceSubscription,
attributes: ['id'],
include: [{
model: Building,
attributes: ['id', 'name'],
}],
}],
attributes: ['id', 'name', 'description', 'audience_type'],
});
возвращается вот в таком виде[
{
"id": 51,
"name": "ally-center-charlotte-audience",
"description": null,
"audience_type": "BUILDING",
"audienceSubscriptions": [
{
"id": 51,
"Building": {
"street_number": "",
"route": "",
"administrative_area_2": null,
"id": 96,
"name": "Ally Center Charlotte"
}
}
]
},
...
]
Есть ли возможность запихать все билдинги в массив и вернуть в таком виде?{
"id": 51,
"name": "ally-center-charlotte-audience",
"description": null,
"audience_type": "BUILDING",
"buildings": [
"id": 96,
"name": "Ally Center Charlotte"
]
},🌠