title: How to select id object in json data and add to another json data object array
body: <p>I want select one object in json data(productData) and add to another object array(saveProduct) in json data(storeData),,, </p>
  
  <p>productData component  :////////////</p>
  
  <pre><code>import React, { Component } from 'react'
  import { dragSource, DragSource } from 'react-dnd'
  
  const itemSource = {
  beginDrag(element) {
  return element.item
  },
  endDrag(element, monitor, component) {
  if (!monitor.didDrop()) {
    return
  }
  return element.handleDrop(element.item.id),
  console.log("Return id",element.item.id)
  }
  }
  function collect (connect, monitor) {
  return {
  connectDragSource: connect.dragSource(),
  connectDragPreview: connect.dragPreview(),
  isDragging: monitor.isDragging()
  }
  }
  class Products extends Component {
  render () {
   const { isDragging, connectDragSource, item } = this.props
   const opacity = isDragging ? 0 : 1
   return connectDragSource(
    &lt;div&gt;
      &lt;div className='item' style={{ opacity}}&gt;
        {item.name}
      &lt;/div&gt;
    &lt;/div&gt;
    )
    }
    }
  export default DragSource('item', itemSource, collect)(Products)
  </code></pre>
  
  <p>storeData component  : 
  ///////////</p>
  
  <pre><code>import React, { Component } from 'react'
  import { DropTarget } from 'react-dnd'
  
  function collect (connect, monitor) {
  return {
  connectDropTarget: connect.dropTarget(),
  hovered: monitor.isOver(),
  item: monitor.getItem()
  }
  }
  class Store extends Component {
  render () {
  const { connectDropTarget, hovered, item } = this.props
  const backcgroundColor = hovered ? 'lightgreen' : ''
  return connectDropTarget(
    &lt;div&gt;
      &lt;div className='Store' style={{ background: backcgroundColor }} onClick= 
        {this.props.handleSelect}&gt;
        {this.props.itemS.name}
      &lt;/div&gt;
    &lt;/div&gt;
  )
  }
  }
  export default DropTarget('item', {}, collect)(Store)
  </code></pre>
  
  <p>productData json:</p>
  
  <pre><code>[
  {
      "code": "P1",
      "id": "1",
      "name": "product-no-1",
      "size": 20,
      "temperature": -18,
      "humidity": {
          "min": 0,
          "max": 11
      }
  },
  {
      "code": "P1",
      "id": "2",
      "name": "product-no-2",
      "size": 20,
      "temperature": -18,
      "humidity": {
          "min": 0,
          "max": 11
      }
  },
  ]
  </code></pre>
  
  <p>storeData json:</p>
  
  <pre><code>[
  {
      "code": "f1",
      "name": "storage-no-1",
      "capacity": 125,
      "temperture": -18,
      "humidity": 3,
      "saveProduct":[]
  },
  {
      "code": "f2",
      "name": "storage-no-2",
      "capacity": 15,
      "temperture": -18,
      "humidity": 25,
      "saveProduct":[]
  }
  ]
  </code></pre>
  
  <p>I asked this question a few times and did not receive a response. Please help me.</p>