I meant more the " && data[element].is_a?(Hash)" but it's ok anyways :-)