Making parameter for hash path

first_page_response_parameters = [“data”][0][“data”][“rows”]
#collecting values from a first response
hash2#{first_page_response_parameters}.each do|i|
$temp_arr << i
end

how to make it work properly parametere based

You might want to explore the XKeys gem.