I have the following encoded JSON:
const data = JSON.parse('{"first":{"aaa":"111","bbb":"2222"},"second":{"aaa":"111","bbb":"2222"}}')
After decoding as follows:
{
"first": {
"aaa": "111",
"bbb": "2222"
},
"second": {
"aaa": "111",
"bbb": "2222"
}
}
I've then tried a few a number of ways to loop through this data as follows but not work as expected:
{Object.keys(data).map((key, value) =>
console.log(key);
<li>{value.aaa}</li>
)}
I can console.log out the data and see it loops but I can't see to display the aaa or bbb values.
What am I doing wrong here?