Currently, my requirement is that I want a checkbox in front of names.You can see below screenshot.
So I used lightning-checkbox-group
in iteration but it does not work.
Here is the Playground Link for your reference
Here is the code i used -
HTML :-
<template>
<lightning-card title="HelloForEach" icon-name="custom:custom14">
<ul class="slds-m-around_medium">
<template for:each={contacts} for:item="contact">
<div key={contact.Id}>
<lightning-checkbox-group name="Checkbox Group"
label="Checkbox Group"
options={options}
value={value}>
</lightning-checkbox-group>
{contact.Name}, {contact.Title}
</div>
</template>
</ul>
</lightning-card>
</template>