我有一个API,它使用fields属性中的属性给出这样的数据 .

{
records: [
    {
    id: "123",
    fields: {
        author: {
        id: "1",
        name: "Paul"
        },
        title: "My awesome blog post",
        comments: [
        {
            id: "324",
            commenter: {
            id: "2",
            name: "Nicole"
            }
        }
        ]
    }
    }
]
};

在规范化时,我现在用一个简单的 processStrategy: (input, parent, key) => input.fields 来处理它,但我想再次对此进行非规范化,以便非规范化实体包含这个字段结构,因为API期望它这样 .

到目前为止,使用 const denormalizedData = denormalize([123], [article], normalizedData.entities) 对我的规范化数据进行非规范化省略了该字段:

[
{
    "author": {
    "id": "1",
    "name": "Paul"
    },
    "title": "My awesome blog post",
    "comments": [
    {
        "id": "324",
        "commenter": {
        "id": "2",
        "name": "Nicole"
        }
    }
    ]
}
]

我在api docs中找不到关于如何在非规范化上添加额外处理的任何内容,任何想法?