In the Bible who was Onan the son of?

Onan was the second son of Judah in the Bible. It can be found in the book of Genesis Chapter 38. According to the Bible, he died a premature death by God's will. And it was because he was a wicked person.