Cascade value behavior

Currently I have in my index an array of sizes.
I was able to render those sizes on a dropdownlist. My question is, I have another array within my index records but I want to show the value of this array based on the selected size value, how can I do this?

container: ‘#hits’,
templates: {
item: <div> <a id="lnk" href="/Pages/ProductDetails.aspx?StockCode={{StockCode}}&C={{ProductClass}}&C4={{CategoryID}}"/> <img src="{{WebUrl }}" align="left" alt="{{ProductCode}-{Name}}" class="img"> </a> <div class="hit-name"> <a id="lnk" class="hit-name" href="/Pages/ProductDetails.aspx?StockCode={{StockCode}}&C={{ProductClass}}V&C4={{CategoryID}}"> {{#helpers.highlight}}{"attribute":"ProductName"} {{/helpers.highlight}} </a> </div> <div class="hit-price"> <label for="productCode" class="blackFontHeavy2">Product No:</label> <label class="BlackArial5" id="productCode"> {{#helpers.highlight}}{"attribute":"StockCode"}{{/helpers.highlight}} </label> </div> <div class="hit-price"> <label for="productCode" class="blackFontHeavy2">Size:</label> <select name="Sizes" id="Sizes"> <option value=-1">Select</option> {{#Size}} <option value="{{.}}">{{.}}</option> {{/Size}} </select> </div> <div class="hit-price"> <label for="price" class="blackFontHeavy2">Price:</label> <label class="BlackArial5">$0</label> </div> <div class="hit-price"> <label for="quantity" class="blackFontHeavy2">Quantity:</label> <input type="number" id="quantity" name="quantity" min="1" max="10"> </div> <div class="hit-price"> <input type="hidden" id="selProdInfo" runat="server"> <input type="submit" class="btn-add-to-cart" name="btnAddToCart" runat="server" onclick="return AddToCart();" id="btnAddCart" onserverclick="BtnAddToCart_Click" value="Add to Cart"/> </div> </div> ,
},
})

I appreciate your help, thank you.

Maybe add a screenshot. It is hard to understand your issue. In general you could put any JS statements inside your item.

For example:

<div>`${Math.random()}`</div>

So in your case the value should be a variable.

<div>`Num of items: ${count}`</div>

Anyway - again your Q is too general (Maybe add some sandbox).