Combine tomatoes, apple, demerara sugar, onion, brown sugar, apple cider vinegar, lemon juice, salt and cayenne pepper in a large pot; bring to the boil. Reduce heat and simmer, stirring occasionally, until dark and syrupy, about 2 hours 30 minutes. Continue simmering until mixture thickens to a jam-like consistency, about 30 minutes more.
Remove jam from heat and cool to room temperature, 1 to 2 hours. Transfer to lidded containers and store in fridge.