normalizr - Issu normalizing data ( entity with children of same entity ) -
i'm new normalizr.
i'm trying normalize json api answer looks this: http://myjson.com/15st3f
there nested elements of same entity. exemple:
{ "id": 1, "name": "a", [...] "children": [ "id": 2, "name": "b", [...] "children": [ "id": 3, "name": "c" ] ] }
how should start this? i'm bit confuse. can normalized? can have array of same entity, or ? can ? :
const uor = new schema.entity('uors', { uorchildren: [ uor ] })
const uor = new schema.entity('uors'); uor.define({ children: [ uor ] });
Comments
Post a Comment