Pseudo Jonathan Exodus 1:15
14 And made their lives bitter with hard work in clay and bricks and in all kinds of work in the open country; with harshness they made them do all their work. 15 And Pharaoh said that while he slept, he saw in his dream that all the land of Egypt was placed on one balance of a weighing scale, and a lamb, the young of a ewe, on the other balance of the weighing scale; and the balance of the weighing scale on which the lamb was placed weighed down. Immediately he sent and summoned all the magicians of Egypt and told them his dream. Immediately Jannes and Jambres, the chief magicians, opened their mouths and said to Pharaoh: 'A son is to be born in the assembly of Israel, through whom all the land of Egypt is destined to be destroyed.' 16 Therefore Pharaoh, the king of Egypt, took counsel and said to the Jewish midwives—one of whom was named Shiphrah, she is Jochebed, and the other was named Puah, she is Miriam, her daughter. 17 And he said, 'When you act as midwives for the Jewish women, you shall look at the birthstool: if it is a male child, you shall kill him; but if it is a female child, she shall live.' 18 But the midwives feared before the Lord, and they did not do as the king of Egypt told them but let the sons live.
Matthew 2:13
11 As they came into the house and saw the child with Mary his mother, they bowed down and worshiped him. They opened their treasure boxes and gave him gifts of gold, frankincense, and myrrh. 12 After being warned in a dream not to return to Herod, they went back by another route to their own country. 13 After they had gone, an angel of the Lord appeared to Joseph in a dream and said, “Get up, take the child and his mother and flee to Egypt, and stay there until I tell you, for Herod is going to look for the child to kill him.” 14 Then he got up, took the child and his mother during the night, and went to Egypt. 15 He stayed there until Herod died. In this way what was spoken by the Lord through the prophet was fulfilled: “I called my Son out of Egypt.” 16 When Herod saw that he had been tricked by the wise men, he became enraged. He sent men to kill all the children in Bethlehem and throughout the surrounding region from the age of two and under, according to the time he had learned from the wise men. 17 Then what was spoken by Jeremiah the prophet was fulfilled: 18 “A voice was heard in Ramah, weeping and loud wailing, Rachel weeping for her children, and she did not want to be comforted, because they were gone.”
Notes and References
"... It is also noteworthy that the story of Moses in extra–biblical Jewish tradition provides additional material that makes this parallel even more pronounced. For example, according to Josephus (Antiquities 2.9), Pharaoh slaughtered the Hebrew infants not merely to control Israel’s population, but because of a prophecy which came to Pharaoh through a sacred scribe that Israel’s liberator would be born. So also in Targum Pseudo–Jonathan, Pharaoh is warned by his magicians of a coming liberator “by whose hand will be destruction to all the land of Mizraim.” This is precisely Herod’s reason for wanting to destroy Jesus. Further, in these traditions Moses’ father was prompted to rescue Moses because of a dream in which he was told Moses would deliver Israel. In both instances, God sovereignly intervenes to rescue Moses, the promised deliverer. These parallels, which were likely extant in Matthew’s day, explicitly highlight the Moses/Exodus typology in the birth narrative of Matthew and the parallel between Herod and Pharaoh. Thus, “The worst of all tyrants, an enemy of God and people alike, is represented as engaged in a vain struggle with the true king of the people and Son of God.” Herod feared an earthly king, yet the serpent feared a heavenly King, and so Herod “was bound and dragged by the chains of the devil” as he attempted to stamp out the seed of woman ..."
McMains, Matthew Jay Deliver Us from the Evil One: Cosmic Conflict in Matthew's Gospel (p. 74) The Southern Baptist Theological Seminary, 2018