I am quite new to React so I would like to ask you, if there is any way to loop through 2D array in React.
Example of 2D array:
const db = {
"1": {
"1": "aaa",
"2": "bbb",
"3": "ccc"
},
"two": {
"1": "ddd",
"2": "eee"
}
};
My pseudo code:
for(i = 1; i < db.lenght; i++){
for(j = 1; j < db[i].lenght; j++){
console.log(db[i][j]);
}
}
But I don't know how to render it in React, for example in <ul>
tag.
, I will update question.
– DanoSVK Aug 29 '18 at 19:56