Reputation: 105
I have an array that has a list of objects and I am trying to loop through it but it seems to not working.
<!-- ko foreach: applicationsAndProducts -->
<p>Apps and Products</p>
<ul>
<li data-bind="text: applicationsAndProducts.Product"></li>
</ul>
<!-- /ko -->
applicationsAndProducts has 3 values as below
Upvotes: 0
Views: 35
Reputation: 1966
You should only be using Product
instead of applicationsAndProducts.Product
. Check the documentation for foreach binding
<!-- ko foreach: applicationsAndProducts -->
<p>Apps and Products</p>
<ul>
<li data-bind="text: Product">
</li>
</ul>
<!-- /ko -->
Upvotes: 0