Wash, peel, and core apples. Chop them into 1-inch chunks.
Add chopped apples to a large bowl and add lemon juice and lemon zest. Stir to combine.
In a medium saucepan over medium heat, combine water, white sugar, brown sugar, ground cinnamon, ground nutmeg, ground cloves, cornstarch, and salt. Stir well until the cornstarch dissolves.
Bring to a boil while stirring often, and boil for 2-3 minutes.
Add the apples, reduce heat from medium to low, cover saucepan with a lid, and let the apples simmer for 6-8 minutes, or until apples have softened, but are not mushy. Stir often.
If you find that the filling is too watery for your taste, you can thicken it by mixing 2 tablespoons of cornstarch with 2 tablespoons of water in a small bowl until the cornstarch is fully dissolved. Add this slurry to the filling and let it simmer for 2 minutes to thicken.
Remove from heat and stir in the butter if using.
Cool it to room temperature, transfer it to an airtight container or jars, and refrigerate.
The mixture will thicken more as it cools.