Knockout has two utility methods that might help here.
ko.dataForwill return the ViewModel that the element is bound to.-
ko.contextForreturns the “binding context” of the current element. The object you get back from this method will return something like:{ $data: ..., $parents, $root }
So if I understand your question, you can probably use ko.dataFor here. Here’s a simple example using dataFor.