I am looking to convert my JSON file into an arraylist that can be utilized to showcase the information on a webpage.
Here is my HTML file snippet:
var xmlhttp = new XMLHttpRequest();
xmlhttp.onreadystatechange = function() {
if(this.readyState == 4 && this.status == 200) {
console.log(JSON.parse(this.responseText))
}
};
xmlhttp.open("GET", "PATIENT51.txt", true);
xmlhttp.send();
This is how my JSON file looks like:
{
“resourceType”:”RiskAssessment”,
“Notes”: [
{“date”: “05/13/2019”, “note”: “my notes”},
{“date”: “02/22/2018”, “note”: “cool”}
]
}
I am struggling to access the 05/13/2019
, I have attempted using
myObj.Notes[0].note;
Unfortunately, it returns as "undefined". My end goal is to create a table where each date will have an associated note.