Can a Json Object be passed as a value on a checkbox? I have multiple checkboxes as shown below... selectedUsers is an array containing the selected values... I would like to end up with a json array like [{"userid": "12345"}, {"userid": "54321"}]
<input
:id="`checkbox` + index" v-model="selectedUsers"
:value="{"userId": user.userId}"
@change="selectUsers"
The code above is throwing a parsing error Parsing error: unexpected-character-in-attribute-name.
I am able to pass an object like this
:value="{userId: user.userId}"
Is there a smart way to achieve my desired outcome here?