I'm iterating through the list of objects, i want to render the class name based on the one attribute from the object.
Here is my sample js:
<template for:each={tempList} for:item="tempItem">
<div key={tempItem.label}>
<span class={testMethod.isActive} >
{tempItem.label}
</span>
</div>
</template>
Best Answer
You could define a getter that processes the list and adds additional data: