This is the multi-dimensional array. I believe that this is working, I just had it all working as a object within objects, but the assignment requires an array.
{
"content" : {
"bio": [
{"h1": "Modern . Creative . Reliable"},
{"h2": "Hello, my name is Sarah LeBret"},
{"p": "I make art the modern way. I have been an artist since I was 14 and still to this day enjoy throwing paint at a canvas... but I decided to use my crazy creativity to make art with the other invention I love. Techonolgy is always envolving and I wanted to be a part of that world. Being a Web Designer/ Graphic Designer for me is what dreams are made of. I let the right side of my brain take over and create elegant modern designs for clients."}
],
"projects": [
{"h1": "Projects by Sarah LeBret"},
{"h3":"Set Sail Painting"},
{"p":"This painting I created in my short experince of taking Fine Arts in the Georgian College program. The emotion captured was 'Anxiety'. This shows my love for moderized bold art."},
{"h3":"King Walrus Design Logo"},
{"p":"This logo was created using Adobe Illustrator in my first semester at Georgian College in my current program: Interactive Media Design-Web."},
{"h3":"Mood Board Design"},
{"p":"<small>This mood board was created in my Design Principles class to experiement what it would be like to create one for a client. I used many references for inspiration and was very proud of my outcome.</small>"}
],
"footerText": [
{"footer":"Copyright © 2016-2017 King Walrus Design"}
]
}
}
Here is what I have for the function to add the footer text. I thought that the getElementById would work, and tried adding [] around footerText but nothing is working. What am I missing?
// Fill footer
function fillFooter(){
var XHR = new XMLHttpRequest();
let myFooter = {};
XHR.open("GET","./content.json");
XHR.send();
XHR.onreadystatechange=function(){
if((XHR.status===200)&&(XHR.readyState===4))
{
footerText = JSON.parse(this.responseText);
document.getElementById("websiteFooter").innerHTML = content.["footerText"].footer;
}
}
}