Finish the method definition given below.
respondent_details
is an array of hashes. Each hash has keys :name
and :age
and and a few variable number of keys, each a section name. :name
and :age
stores the name and age of the respondent, while the other keys store the number of questions the respondent answered against respective section.
Given respondent_details
, the method should calculate the total number of questions answered by the respondents and store it in a key :total_count
in each hash. The method should then return the updated array of hashes.