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 ] }) 

use define instance method:

const uor = new schema.entity('uors'); uor.define({ children: [ uor ] }); 

Comments

Popular posts from this blog

javascript - Clear button on addentry page doesn't work -

c# - Selenium Authentication Popup preventing driver close or quit -

tensorflow when input_data MNIST_data , zlib.error: Error -3 while decompressing: invalid block type -