Clean (remove skin and black 'eyes') the pineapples. Cut them each into about 4 chunks lengthwise
Coarsely grate the pineapple chunks. Best using a box grater
Let the pineapple sit in a sieve over a large bowl / container to catch the juice. You will use this later
In a large wok, add the grated, sieved pineapple, sugar and spices. Set on medium-high heat and allow to come to a boil, stirring occassionally
As the liquid boils off, add back a quarter of the reserved pineapple juice from earlier. Continue boiling and stirring to dry out the mixture, adding the juice back quarter by quarter until it is all incorporated. Your final addition of liquid will be the juice of one lemon
Continue to simmer this on medium heat, stirring often as the mixture becomes drier and more jam-like. This is what you're aiming for - a golden-brown, sticky paste that you'll be able to roll into balls
Once you're there, turn off the heat and leave until cool. Remove all the spices and store in an airtight jar in the fridge. This is fine for at least two weeks if you don't intend to use right away