Um exemplo minimo de como criar essa solução utilizando `map` em vez de `reducer`: <!-- begin snippet: js hide: false console: true babel: false --> <!-- language: lang-js --> const animais = { "types": [{ "objid": 100196, "animal": "dog", "type": "adult", "tags": "AA 96 87" }, { "objid": 100578, "animal": "cat", "type": "old", "tags": "T2 96 AB" }, { "objid": 100643, "animal": "parrot", "type": "young", "tags": "MAN L5 65" }, { "objid": 101165, "animal": "falcon", "type": "teen", "tags": "T2 56 AA" }, { "objid": 101168, "animal": "rabbit", "type": "old", "tags": "FII R25 75" }, { "objid": 164713, "animal": "rabbit", "type": "teen", "tags": "MAN R25 75" }, { "objid": 101174, "animal": "horse", "type": "baby", "tags": "MAN R62 75" }, { "objid": 101177, "animal": "turtle", "type": "old", "tags": "MAN R4 75" }, { "objid": 101180, "animal": "tiger", "type": "young", "tags": "MAN R8 75" }] } const types = animais.types.map((obj, index) => { const key = obj.animal; const tags = obj.tags.split(' '); return { key: obj.animal, tags: { [tags[0]]: obj.objid } }; }, {}) console.log(types); <!-- end snippet -->