Error pulling info from database
<p>I am building a website that is run locally.</p>

<p>I have a database that looks like this:</p>

<pre><code>  "posts":
        {
            "0":
                {

                    "count": 5
                },
            "1":
                {
                    "postID": 1,
                    "user": 1,
                    "showComments": false,
                    "date": 1451606400,
                    "upvotes": 127,
                    "downvotes": 6790,
                    "lat": 42.389825,
                    "long": -72.528267,
                    "commentsIDList": [1,2], // when implementing comments, store them by ID so they can be ontained easily
                    "postText": "Lorem ipsum dolor sit amet"
                },
}
</code></pre>

<p>I want to dynamically pull the 'postText' by mapping over the db entries. So far I have this:</p>

<pre><code>&lt;div className="feed-body"&gt;
              {this.state.postText[this.state.active].posts.map( (map, i) =&gt; {
                return (
                &lt;Post key={i + (this.state.active * 1000)} parentId={this.state.posts[this.state.active].userID} data={map} /&gt;
                    );
                })}
                      &lt;/div&gt;
</code></pre>

<p>However, every time I ran the main page doesnt load. When I remove this piece of code from my index.js file, everything works fine, except that nothing is pulled from the db. So I know the error is in this of code, I just don' know if I am pulling the right way. </p>