I have a knockout js code in magento2 order summery detail page.
here is the code
<p data-bind="text:console.log('parent befor', $parent)"></p>
<!--ko foreach: { data: JSON.parse($parent.options), as: 'option' } -->
<p data-bind="text:console.log('parent after', $parent)"></p>
The $parent variable changes its content once we go inside foreach loop. I need some other information of this $parent variable once inside loop but it all get replaced by some unknown information. Here is my console.log. How i can use the original $parent information inside foreach loop.
parent befor {item_id: "300", name: "Vertual Product", qty: 1, price: "3.0000", base_price: "3.0000"}
parent after UiClass {_super: undefined, ignoreTmpls: {…}, _requested: {…}, containers: Array(1), exports: {…}, …}