http://qs1969.pair.com?node_id=11138236


in reply to Re: Iterating over hash to find specific key to sum up the cost
in thread Iterating over hash to find specific key to sum up the cost

your indentation is misleading, the cost entries are at different levels.

You're right that it's misleading, for my reply I assumed there were two closing braces missing right before '135-1' and '1069-9', in which case the cost keys would be at the same level, but your interpretation is possible as well.

vaitor15: Please clarify your input data.

Update: The code in the OP did not compile when I replied because there were missing closing braces. It seems that has now been fixed and you are correct about the nesting.