title: Getting data from a JSON array and setting states based on the data using loop in React
body: <p>Suppose, I'm getting JSON array and want to <strong>setState</strong> as I'm getting that array in my component.</p>
  
  <pre><code>        for( var follower_id = 0; follower_id &lt; followers_data.length; follower_id++) {
            this.setState({
              followers_data_username[followers_data_username.length] = followers_data[follower_id].login
            });
            console.log(followers_data_username[0]);
          }
  </code></pre>
  
  <p>But I don't know how to set up my <strong>getInitialState</strong> if I'm going to use an array. Also, I don't think that I can <strong>setState</strong> of an array.</p>
  
  <p>I'm new to React. So, any help or pointing to the right direction would be highly appreciated.</p>
  
  <p>Consider the JSON to be something similar to this: <a href="https://api.github.com/users/ghoshnirmalya/followers" rel="nofollow">https://api.github.com/users/ghoshnirmalya/followers</a></p>