Can the NgRx Entity library normalize a nested JSON api response? If I have data structured like this:
[
{
"id": "1",
"title": "My first post!",
"author": {
"id": "123",
"name": "Paul"
},
"comments": [
{
"id": "249",
"content": "Nice post!",
"commenter": {
"id": "245",
"name": "Jane"
}
},
{
"id": "250",
"content": "Thanks!",
"commenter": {
"id": "123",
"name": "Paul"
}
}
]
},
{
"id": "2",
"title": "This other post",
"author": {
"id": "123",
"name": "Paul"
},
"comments": [
{
"id": "251",
"content": "Your other post was nicer",
"commenter": {
"id": "245",
"name": "Jane"
}
},
{
"id": "252",
"content": "I am a spammer!",
"commenter": {
"id": "246",
"name": "Spambot5000"
}
}
]
}
]
Is it possible to flatten this structure with NgRx Entity, and if so, how can it be achieved?
I have attempted to use the normalizr library to flatten the object successfully, but integrating it with NgRx helper functions like createReducers() and createActions() has been challenging. Any suggestions on how to proceed?