have someone pegged
have (someone) pegged
mainly American
to know exactly what kind of person someone is.
He thinks we're all taken in by his charm, but I've got him pegged.
Cambridge English Idioms Dictionary