title: Display API data using Axios and a list in React
body: <p>I'm attempting to make a request to this <a href="https://www.themoviedb.org/documentation/api" rel="nofollow noreferrer">https://www.themoviedb.org/documentation/api</a> API in a React project and then display JSON data on my site.</p>
  
  <p>I'm using Axios to make the request and I have been able to make the request and get the appropriate JSON data and console.log it or view it in the React tools in Firefox. However, I am having difficulty displaying the data in a ul. Initially I had an error pertaining to having a unique key for each list item, and I have since resolved that (or so I believe).</p>
  
  <p>Here's my request and how I am attempting to render the data: </p>
  
  <pre><code>import React, { Component } from 'react';
  import ReactDOM from 'react-dom';
  import axios from "axios";
  
  
  export default class App extends Component {
    constructor(props) {
      super(props);
      this.state = {
        posts: []
      }
    }
  
    componentDidMount() {
      axios.get(`https://api.themoviedb.org/3/movie/now_playing?api_key=*apikeyhere*&amp;language=en-US&amp;page=1`)
        .then(res =&gt; {
          const posts = res.data.results.map(obj =&gt; [obj.title, obj.overview]);
          this.setState({ posts });
        });
    }
  
  /*  render() {
      return (
        &lt;div&gt;
          &lt;h1&gt;Movie API data&lt;/h1&gt;
          &lt;ul&gt;
            {this.state.posts.map(post =&gt;
                &lt;li key={post.toString()}&gt;{post.title}&lt;/li&gt;
              )}
          &lt;/ul&gt;
        &lt;/div&gt;
      );
    }
  }
  */
  
    render() {
      return (
        &lt;ul&gt;
          {this.state.posts.map(function(post, index){
            return (
                &lt;div key={index}&gt;
                  &lt;h1&gt;{post.title}&lt;/h1&gt;
                  &lt;p&gt;{post.overview}&lt;/p&gt;
                &lt;/div&gt;
              )
            }
          )}
        &lt;/ul&gt;
      );
  
    }
  
  }
  </code></pre>
  
  <p>As you can see I attempted multile approaches to rendering this. What's wrong with my code and why isn't the JSON data rendering in the ul on my site?</p>