combineTrackInfo(){
          let trackNames = this.state.topTracks
          let trackAttributes = this.state.topTracksAttributes

          for (let i=0; i < trackNames.length; i++){
              
              for (let j=0; j<trackAttributes.length; j++){
                  if (trackNames[i].id === trackAttributes[j].id){
                      trackNames[i].song_attributes = trackAttributes[j]
                  }
              }
          }

         this.setState({
             combineTrackInfo : trackNames
         })
        //  console.log("update state 4")
        //  console.log(this.state)
         this.getIdealSong();
        //  console.log(this.state)
      }
// function to combine data into state variable to load table to make sort easier
function to combine data into state variable to load table to make sort easier
function to combine data into state variable to load table to make sort easier
combineTrackInfo(){
          let trackNames = this.state.topTracks
          let trackAttributes = this.state.topTracksAttributes
          for (let i=0; i < trackNames.length; i++){
              for (let j=0; j<trackAttributes.length; j++){
                  if (trackNames[i].id === trackAttributes[j].id){
                      trackNames[i].song_attributes = trackAttributes[j]
                  }
              }
          }
         this.setState({
             combineTrackInfo : trackNames
         })
         this.getIdealSong();
      }
combineTrackInfo ( ) { let trackNames = this . state . topTracks let trackAttributes = this . state . topTracksAttributes for ( let i = 0 ; i < trackNames . length ; i ++ ) { for ( let j = 0 ; j < trackAttributes . length ; j ++ ) { if ( trackNames [ i ] . id === trackAttributes [ j ] . id ) { trackNames [ i ] . song_attributes = trackAttributes [ j ] } } } this . setState ( { combineTrackInfo : trackNames } ) this . getIdealSong ( ) ; }
function to combine data into state variable to load table to make sort easier
function to combine data into state variable to load table to make sort easier
//  console.log("update state 4") //  console.log(this.state) //  console.log(this.state)