I was listening to Genesis 37-38 the other day and there was a striking verbal parallel between the narrative in which Joseph's brothers sell him and deceive their father Jacob and the narrative in which Tamar deceives Judah into sort of fulfilling his obligations to her.
Genesis 37:31-33 (ESV)
Then they took Joseph's robe and slaughtered a goat and dipped the robe in the blood. And they sent the robe of many colors and brought it to their father and said, "This we have found; please identify whether it is your son's robe or not." And he identified it and said, "It is my son's robe. A fierce animal has devoured him. Joseph is without doubt torn to pieces."
Genesis 38:25-26 (ESV)
As she was being brought out, she sent word to her father-in-law, "By the man to whom these belong, I am pregnant." And she said, "Please identify whose these are, the signet and the cord and the staff." Then Judah identified them and said, "She is more righteous than I, since I did not give her to my son Shelah."
What is the purpose of this connection? It seems unlikely that the parallel is being drawn between Joseph's brothers and Tamar as the presenter of these items. Is the parallel between Joseph and Judah, whose items are being identified? If so, what are we to understand by this connection?
Or perhaps is the connection between Judah and Jacob who are identifying them and were both in some way deceived? (Though, Jacob is deceived through his act of identification, while Judah is made undeceived through his.) What would the author be indicating in this case?