I want to get the value of that particurlar label but in the console i'm only getting the event.target.id
but not the event.target.value
is showing undefined
async function initiateChat(event) {
console.log(event.target.id)
console.log(event.target.value)
}
<div><label value={customer} id="customer" onClick={initiateChat}>{customer}</label>