Updating hash key value

here i have hash in this form ,how can i update pageToken key value ?

It’s not an hash, but a 3dimension array. But with the " it is just a string.

But without the listing it is hard to say. Just in case an example of the use of the bracket with an hash,

dictionary = { "one" => "eins", "two" => "zwei", "three" => "drei" }
dictionary["one"] = "uno"
puts dictionary["one"]

If it is a hash, which it could be, it’s probably a lot more complicated structurally than it needs to be. But that aside, you should simply be able to do

endpoint_body[:reportRequests][0][:pageToken] = 'whatever'