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:
Knowing sth from sth meaning & definition 1 of Knowing sth from sth.