[Solved] Negative string value in hash ruby [closed]


Try

transaction['amount']

For example

a = {"amount"=>"-50.01", "currency"=>"CAD"}

Then

a['amount']

returns ‘-50.01’

2

solved Negative string value in hash ruby [closed]