It seems a tiny bit odd to have this as a separate method rather than recursively calling filter_params - I'm not sure the extra complexity is worth it unless we have to traverse parameters like that elsewhere in the client code.