Newbie question working with JSON responses and arrays

Summing a set of values from an API response but getting confused
flipping between hashes and arrays. This feels like it should be really
simple.

All code provided below

sum = request[“orders”].reduce(0) do |sum,item|
sum + item[“total_price”].to_r
end
puts sum
puts sum.to_f

I converted the strings representing the prices to Rationals to avoid
rounding errors.