0

I would like to print array one value with another array value by using concat

const names = {
    node1: {
        g: ['ro', 'cf', 'de'],
        h: ['no', 'ei','ie', 'ak'],
    },
    node3: {
        k: ['di', 'eik', 'dn'],
        f: ['ei', 'ci', 'ao'],
    },
    node5: {
        a: ['dc','eg', 'io'],
        b: ['ei', 'ik', 'cf'],
    }
};

I would like to get result like below result by looping each array item. I have been looping array in array to get this result. But, I can't figure it out.

//first key loop on another object array items
ro di
ro eik
ro dn,
ro ei,
ro ci,
ro ao
ro dc,
ro eg,
ro io,
ro ei,
ro ik,
ro cf
ro di dc
ro eik eg
ro dn io
ro ei ei
ro ci ik
ro ao cf

The main reason what I am doing is to get random name generate by each array section.

evolutionxbox
  • 3,932
  • 6
  • 34
  • 51
Por
  • 403
  • 5
  • 18

0 Answers0