here code using in larger function:
this.categoriestosearch = ko.observablearray(["food"]);// initial selection console.log(this.categoriestosearch[0]);
running returns undefined
. knockout.js documentation says observablearrays supposed read way. there better way read observablearrays?
answering own question since came answer right after posting: observablearrays functions correct way pull item is:
this.categoriestosearch()[0]
Comments
Post a Comment