我知道我可以访问订阅变量的 newValue 但我如何访问它的名称:
for ( var i = 0; i < carSelects.length; i++) {
var carId = $(carSelects[i]).attr('carId');
self["cars_" + carId + "_selected"] = ko.observableArray();
self["cars_" + carId + "_selected"].subscribe(function(newValue) {
// here i want to access the name of the subsribed variable
// i.e. "cars_" + carId + "_selected"
});
}