{
"comments": [
{
"created_utc": 1622513325,
"text": "gdhg sgf sddsfsd fdsf"
},
{
"created_utc": 1622513188,
"text": "sfdg sgf fdgfdg"
}
]
}
How would you iterate over each object to see the text?
Something like..?
let data = fs.readFileSync(path.resolve(__dirname, 'comments.json'));
let comments = JSON.parse(data);
for(var i in comments){
for(var j in i) {
console.log("? " + j.text)
}
}