In a large saucepan, whisk together sugar, brown sugar, cornstarch, cinnamon, nutmeg, and salt.
Slowly pour in the water while whisking to prevent lumps.
Cook over medium heat until the mixture begins to bubble and thicken slightly.
Add the apple slices and stir gently to coat them in the syrup.
Reduce the heat and let it simmer for about 10 minutes, stirring occasionally, until the apples soften but still hold their shape.
Remove from heat and stir in lemon juice.
Let the mixture cool before transferring to jars or using immediately in your favorite pie recipe.