Js Code :
getRowData: function() { return window.checkoutConfig.row_data; } Knockout Code :
<!-- ko foreach: { data: getRowData(), as: 'rowdata' } --> <p data-bind="rowdata.rows.item"></p>// here i need rows key dynamic then how could i get it. <!-- /ko --> I am facing some challenges to render this type of data in magento checkout page using knockout js.
{ "rows":[ {"Item":2,"Odd or Even":"number 2 is even"} ], "rows2":[ {"Item":2,"Odd or Even":"number 2 is even"} ], } "rows" it will be dynamic and i am facing issue to get data by passing row key as dynamic in knockout js.
For example on checkout : I want to display row of Item value how could i get it. Any help would be appreciated.