Since the Lord had promised that in Abraham all the families of the Earth would be blessed (Genesis 12.3), it became necessary to show that the Anointed One descended from Abraham, and part of that listing can be found here,
“May your house be like the house of Perez, whom Tamar bore to Judah, because of the offspring which the Lord will give you from this young woman.” So Boaz took Ruth and she became his wife; and when he went in to her, the Lord gave her conception, and she bore a son. Then the women said to Naomi, “Blessed be the Lord, who has not left you this day without a close relative; and may his name be famous in Israel! And may he be to you a restorer of life and a nourisher of your old age; for your daughter-in-law, who loves you, who is better to you than seven sons, has borne him.” Then Naomi took the child and laid him on her bosom, and became a nurse to him. Also the neighbor women gave him a name, saying, “There is a son born to Naomi.” And they called his name Obed. He is the father of Jesse, the father of David. Now this is the genealogy of Perez: Perez begot Hezron; Hezron begot Ram, and Ram begot Amminadab; Amminadab begot Nahshon, and Nahshon begot Salmon; Salmon begot Boaz, and Boaz begot Obed; Obed begot Jesse, and Jesse begot David (Ruth 4.12–22).
Then the New Testament shows that very thing happened,
…the son of Jesse, the son of Obed, the son of Boaz, the son of Salmon, the son of Nahshon… (Luke 3.32).