I'm having problems with this code in Node.js. I need to get the information found in "Contents" of the JSON but it gives me an error that says: "e.Contents.forEach is not a function" I guess it's a logical problem but I honestly do not know nothing happens to me, could you give me an example of how to solve it, please?
This is the JSON:
var jsonFile = {
"Notification": [
{
"Channel":1,
"Type":1,
"Means":
[{
"Number":88888888,
"Code":506
}]
,
"Contents":{
"Message":"This is a message"
}
}
]
}
This is the code:
function Fe(jsonFile){
jsonFile.Notification.forEach(e =>{
e.Means.forEach(function(v){
e.Contents.forEach(function(n){
console.log(n.Message);
})
})
}