Peel and chop the onions. Clean the chillies, halve lengthwise, remove seeds, wash and cut into fine strips.
Caramelise the sugar in a pan or wide pot until golden. Add onions and chilli and deglaze with vinegar. Bring to the boil and cook over medium heat for about 30 minutes until the liquid becomes slightly thick.
Season with salt and pepper.
Fill onion jam immediately into clean twist-off jars and close them. Place on the lid for about 5 minutes. Turn over again and let it cool down. Serve with strong cheese such as Parmesan or Sbrinz.
(3-6 months shelf life).