Knockout foreach generate html fields
问题 I want to display as many fields as user wants. Maybe you have idea how can I do this case using foreach loop in Knockout framework. For example numberOfFields is input field where user can enter how many fields he wants to display <input id="numberOfFields" type="text" data-bind="value: obj().numberOfFields() /> <div data-bind="foreach: new Array(obj().numberofCashFlows())"> <label for="quantity$index()">Flow number $index()</label> <input id="quantity$index()" type="text" data-bind="value: