Knockout: How to pass the Checkbox "checked" value to a Click handler function?
<p>I want to send "true/false" value to a click handler, depending if the checkbox is checked or not. </p>

<ul>
<li>On check, it should send a 3rd parameter (isChecked) with value "true".</li>
<li>On uncheck, it should send a 3rd parameter (isChecked) with value "false".</li>
</ul>

<p>I'm sure this is really easy, but I'm having a hard time figuring it out. 
Here is the input element: </p>

<pre><code>&lt;input class="cards-view--item-checkbox pull-right" type="checkbox"
 data-bind="value: universalParcelId, checked: $parent.isChecked, checkedValue: true, 
 click: function(data, event, isChecked) { 
 return $root.addUPIDtoArray(data, event, $parent.isChecked()) }"&gt;
</code></pre>

<p>Click handler:</p>

<pre><code>addUPIDtoArray: function (data, event, isChecked) {
    var self = this;

    self.isChecked = ko.observable();

    // If checked
    if(isChecked()) {
        self.upIDArray.push(data.universalParcelId);
        self.upIDWithIndexArray.push({
            universalParcelID: data.universalParcelId,
            searchResultIndex: data.searchResultIndex
        });

        // If unchecked
    } else if(!isChecked()) {
        // remove from array
    }

    return true; // allow the default "click" action, which is checking the box with a "check"
},
</code></pre>

<p>I thought i could use the "event" parameter, but for some reason it is coming through as a jQuery.event, instead of a regular DOM event. So I decided for the 3rd parameter. But it just doesn't work like this: gives error <code>$parent.isChecked is not a function</code> </p>

<p>Any ideas?</p>