"Arise, take your wife and your two daughters who are found here" (Genesis 19:15). Two "found ones" [precious finds] came from these survivors: Ruth the Moabite and Naamah the Ammonite. As it is written, "I have found David My servant" (Psalms 89:21). Where did I find him? In Sodom. And it is written, "Behold, I have come; in the scroll of the book it is written concerning me" (Psalms 40:8).
Two Treasures Found in Sodom and the Roots of David
Yalkut Shimoni on Torah 84:7
קוּם קַח אֶת אִשְׁתְּךָ וְאֶת שְׁתֵּי בְנֹתֶיךָ הַנִּמְצָאֹת. שְׁתֵּי מְצִיאוֹת רוּת הַמּוֹאָבִיָּה וְנַעֲמָה הָעַמּוֹנִית (תהלים פט, כא) "מָצָאתִי דָּוִד עַבְדִּי", הֵיכָן מָצָאתִי, בִּסְדוֹם. וּכְתִיב, "הִנֵּה בָּאתִי בִּמְגִלַּת סֵפֶר כָּתוּב עָלַי".