现在当我规范化这个数组时:
[
{
"teamName":"abc",
"description":"",
"id":"123"
},
{
"teamName":"def",
"description":"",
"id":"456"
}
]
Normalizr 输出:
{
"result":[
"123",
"456"
],
"entities":{
"teams":{
"123":{
"teamName":"abc",
"description":"",
"id":"123"
},
"456":{
"teamName":"def",
"description":"",
"id":"456"
}
}
}
}
纯粹通过修改架构,有没有办法输出它呢?
{
"queries":[
"123",
"456"
],
"teams":{
"123":{
"teamName":"abc",
"description":"",
"id":"123"
},
"456":{
"teamName":"def",
"description":"",
"id":"456"
}
}
}
我知道事后我可以很容易地做到这一点,但是有没有内置的方法来调整输出的 JSON 数据的结构?