[SalesForce] How to pass multiple parameters in value attribute in LWC

My requirement is to pass multiple parameters in value attribute from HTML to JS in LWC component.

CODE –

In value attribute in want pass multiple parameters to JS.
I tried writing like this : value={rfiles.Id, rfiles.bankName}

HTML

<template for:each={RelatedFiles.data} for:item="rfiles">
                   <tr key={rfiles.Id}>
                     <td class="relatedFiles">{rfiles.bankName}</td>
                        <td style="text-align: left;">
                           <button 
                             class="slds-button slds-button_outline-brand" 
                             value={rfiles.Id, rfiles.bankName} onclick= 
                             {openEditLimitModal} >
                              Edit Limits
                           </button>
                       </td>
                 </tr>
</template>

JS

 openEditLimitModal(event){
        window.console.log("Value -- " + event.target.value.bankName);
        window.console.table("RecordId -- " + event.target.value.Id); 
    }

Best Answer

You can use data-<attribute>

<button 
    class="slds-button slds-button_outline-brand" 
    onclick = {openEditLimitModal}
    data-id = {rfiles.Id}
    data-bank-name = {rfiles.bankName}>
    Edit Limits
</button>

This is how you can access these data properties.

event.target.dataset.id
event.target.dataset.bankName