In a medium-sized saucepan, melt the butter over low to medium heat.
Add the diced apples, brown sugar, cinnamon, nutmeg, and lemon juice to the saucepan. Stir everything together and let the mixture simmer for about 10 minutes, or until the apples begin to soften and the sugar has dissolved into a syrupy consistency.
Sprinkle the cornstarch over the apple mixture, stirring continuously to avoid lumps. Let the filling cook for an additional 5 minutes, or until it thickens to your desired consistency.
Once thickened, remove the pan from heat and let the apple filling cool completely.