I have a datatable having a column with an input field. To get the data from table I'm using:
table.rows().data().toArray();
Im getting the result array, but for the column with input field I'm getting the whole html of input field and not just the value. eg. '<input type="text" value="someValue"></input>'
How can I manipulate the code to get the value of input in result Array. TIA.
table
.rows()
.data()
.toArray()
.map((el) => {
if(el.includes('<input')){
return el.split('value="')[1].split('"')[0]
}
})
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.