title: concatenate Objects data in one string
body: <p>I have a table that contains objects in JSON: </p>
  
  <pre><code>    items=[
        {"label":"180","quantity":10},
        {"label":"50","quantity":35},
        {"label":"80","quantity":15},
        {"label":"180","quantity":120},
     ]
  </code></pre>
  
  <p>label is a string and quantity is a number, and every time user click on <code>Add</code> button a <code>newItem</code> is added to this table + <code>{"label":"80","quantity":11}</code></p>
  
  <p>what I want is to concatenate this data into one string like this: <code>str == '180_10,50_35,80_15,180_120'</code></p>
  
  <p>and when user click on <code>Add</code> str will be : <code>str == '180_10,50_35,80_15,180_120,80_11'</code> (with new item added 80_11) </p>
  
  <p>my approach doesn't work :</p>
  
  <pre><code>  addRecup = () =&gt; {
      const newItem = {
        label: this.state.values[this.state.codeValue-1].label,
        quantity: this.state.quantite
      };
      this.setState(state =&gt; ({
        items: state.items.concat([newItem]), // add new item, it works
      }));
  
      let str = '';
      let concat = this.state.items.map((item,key) =&gt; (
        str = str + ',' + this.state.items.label + ',' + this.state.items.quantity // concatenate json doesn't work
      ));
  
      console.warn('str: ' + str); // got str: undefined,undefined,undefined...
    } 
  </code></pre>