Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

two dimensional array object in javascript

const IDs = Object.entries(formData?.Recipient).map(([k, v]) => v.map(item => item?.UserID));

this.setState({

  selectedUser : IDs.flat()
})
console.log(IDs.flat())
Source by www.javascripttutorial.net #
 
PREVIOUS NEXT
Tagged: #dimensional #array #object #javascript
ADD COMMENT
Topic
Name
7+4 =