I am trying to output the JSON below to HTML. I have created the object along with the properties for this object however, I am struggling to output this to HTML. Here is what I have so far. Any idea?
var people;
people = [{
first_name: 'Don Molloy',
category: 'academic'
},
{
first_name: 'Pat Quill',
category: 'academic'
}
];
console.log(people);
var myObj = JSON.parse(people);
document.getElementById("output-people").innerHTML = myObj.name;
<p id="output-people"></p>
thanks,