to know the difference between two things and therefore be able to recognize either, used especially to mean that you have a good knowledge and understanding of a particular subject:
Knew it from something meaning & definition 1 of Knew it from something.