Oxygenase that can act as both a histone lysine demethylase and a ribosomal histidine hydroxylase. Specifically demethylates 'Lys-4' (H3K4me) and 'Lys-36' (H3K36me) of histone H3, thereby playing a central role in histone code. Preferentially demethylates trimethylated H3 'Lys-4' (H3K4me3) and monomethylated H3 'Lys-4' (H3K4me1) residues, while it has weaker activity for dimethylated H3 'Lys-36' (H3K36me2). Also catalyzes demethylation of non-histone proteins. Also catalyzes the hydroxylation of 60S ribosomal protein L8 on 'His-216', thereby playing a role in ribosome biogenesis 