Use map_object to remove repeated code in get_hidden_inputs