I have the following KnockoutJS code in order to make a databinding for a Addresses Form Editor where I can have 4 address types ("home", "office", etc).
http://jsfiddle.net/mxgFQ/1/
Right now everything is working great but the selectedAddress is being hardcoded to be the index 0
self.selectedAddress = ko.observable(self.addresses[0]);
Instead of doing this I want to selected the first address object that has data filled in.
Any clue on how to do this?
Appreciate.