Mince the pineapple finely or puree in a processor depending on the texture you want your jam to be. You can also leave it slightly chunky if you like your jam that way.
Tip the minced/pureed pineapple in a cooking saucepan. Add in sugar, lime juice, cinnamon and cloves. Leave it aside for 3-4 hours or until the sugar has completely dissolved.
Place the saucepan on heat, bring to gentle boil and simmer for around 35-50 minutes until it is thick and syrupy; depending on the pan and mode of heat used. Make sure you stir every while because the sugar can easily burn.
Add few drops of yellow colour and stir. Meanwhile sterilize the jar and lid in boiling water for 8 -10 minutes.
To check the doneness of jam, spread a tablespoon of jam on a cold plate and return the plate to the freezer and chill for a minute.
Run your finger through the jam and if you see it wrinkling as you pull, then the jam is ready. If not continue cooking until you reach that wrinkle stage.
Let the jam cool down completely before transferring into a sterilized jam jars.
Once it is completely cooled it will be easier to judge the consistency of jam you require. Fish out the whole spices and discard them using a sterilized fork or spoon.