Compare checkbox checked value

i'am sending msg.payload from dashboard template node to a mustache template node. what i want to do is to check if the input came from the first template is checked or not, in my second template. i have tried a lot of code but none of them works for me.
what do i missing here, and thank you.

>  <td>
>             <input type="checkbox" [checked]="{{payload.0.data8}} == 'true'">
>         </td

i solve it. in template dashboard node

<td>
            <input type="checkbox" ng-model="msg.payload.data8" name="checkbox1" value="value1" class="toggle-column" ng-true-value="'checked'" ng-false-value="'unchecked'">
        </td>

in template mustache node

>  <td>
>             <input type="checkbox" {{payload.0.data8}}>
>         </td>

Well, from what I know, JS does not allow property names to begin with a number, so that .0 does not look correct to me.

my msg.payload is an array of object

Correct, but in the mustache template syntax, that is how you reference elements of an array.

1 Like

Ok, wasn't aware of reinventing the wheel. Thanks for the clarification.