I have the following models related to sequelize.
Event hasMany Characters through characters_attending_boss
Boss hasMany Characters through characters_attending_boss
Characters hasMany Event through characters_attending_boss
Characters hasMany Boss through characters_attending_boss
These tables have been successfully merged, and I can extract data from them. But when I get JSON results, the name of the pass-through model is added to each object, for example:
{
id: 1
title: "title"
-confirmed_for: [
-{
id: 2
character_name: "name"
-confirmed_for_boss: [
-{
id: 9
name: "name"
-character_attending_event: {
event_id: 1
char_id: 2
}
}
]
-character_attending_boss: {
event_id: 1
char_id: 2
}
}
So, I'm looking for a way to hide these "character_attending_boss" segments, if possible, preferably without modifying the results of post-fetch.
Is it possible?
source
share