let schoolData = { "name": "naam",
"schools" : [
"silver stone" ,
"woodlands stone" ,
"patthar"
],
"class" : 12 }
schoolJSON = JSON.stringify(schoolData) ;
let jsonData = JSON.parse(schoolJSON) ;
jsonData.forEach(element => {
console.log(element.schools) ;
});
I am attempting to display the names of schools, but encountering an error:
" Uncaught TypeError: json.forEach is not a function "
Seeking assistance in resolving this issue.