Isaiah speaks of the ruins of Jerusalem as if they were a person that could rejoice. This represents the people of Jerusalem who were defeated. Alternate translation: "you people who live among the ruins of Jerusalem" (See: [[rc://en/ta/man/translate/figs-personification]])
Here "Jerusalem" represents the people. Alternate translation: "he has redeemed the people of Jerusalem" (See: [[rc://en/ta/man/translate/figs-metonymy]])