如何使用normalizr来处理通过标准关键的嵌套标准化JSON API响应{ data: ... }
?
例如一个Book
{
data: {
title: 'Lord of the Rings',
pages: 9250,
publisher: {
data: {
name: 'HarperCollins LLC',
address: 'Big building next to the river',
city: 'Amsterdam'
},
},
author: {
data: {
name: 'J.R.R Tolkien',
country: 'UK',
age: 124,
}
}
}
}
我将如何设计模式来处理嵌套数据键?