How to access the variables inside a collection to use in calculations

 We have an attribute called dieselTank and it’s of type complex. This attribute contains sub-attributes : tankNumber, tankLevel, usageType, etc. The values bound to the sub-attributes are shown like this : $item.subAttributeName. How do we access the values of those subAttributes in form variables to perform manipulations and calculations.

https://ibb.co/ky8pf57 Getting the output like this, same value is been repeated 
https://ibb.co/n7h5Mcb forminput