I am trying to create a hidden form field from a boolean value in my viewModel.
<tbody data-bind="foreach: MediaFiles">
<tr>
<td>
<input type="hidden"
data-bind="attr: { value: MyBool }" />
</td>
</tr>
</tbody>
I need the input's value to be either "true" or "false" based on what's in the view model. Other attributes have been omitted for clarity.
What's the best way to accomplish this with knockout's binding functionality?