Sorrow into Joy

How do sorrow and joy co-exist? Sorrow - with its accompanying grief, sadness, lament, pain, and suffering - can squash happiness. But not joy. Because joy is grounded in the character of God, the work of God, and the presence of God.