So I am trying to call the string in section1.text... My console returns:
Here is my JSX:
return (
<div>
<h1>{this.props.article.title}</h1>
<h2>{this.props.article.subTitle}</h2>
<h3>{this.props.article.body.section1.text}</h3>
</div>
);
Both title and subTitle return fine... but when I try and get the section1.text it returns:
Cannot read property 'section1' of undefined
I looked online and I think it has something to do with it being a nested object, yet I cant get around my problem. Any suggestions?
Any help or advice is appreciated. Thank you in advance?