I know hitler was elected.
Then you "know" wrong.
Hitler was never elected.
His party, was able to get into power with a couple of other parties, then Hitler was named chancellor by the president.
You could of course, if you like, find me a source that shows me that Hitler, was in fact, elected.

Then I will admit that I am wrong.
He then used hatred for a small group to allow him to rally the larger group to support aggressive foreign policy.
Again, you are, of course, wrong.
Hitler's rhetorics to support the aggressive foreign policies wasn't based on critisism on the Jews.
But rather on the fact that the Germans had been caused great injustice during the WW I, and that Germany demanded
Lebensraum (google that word).
Jews, gypsies and other minorities were blamed for any domestic poverty, problems, or related problems.