Put the onions in a large bowl with the salt and mix together. Cover and leave overnight.
Rinse well in cold water and allow to dry as much as possible.
Pack the onions into sterilised jars.
Put the vinegar, chilli flakes and sugar into a pan and slowly bring to the boil to dissolve the sugar.
Pour the vinegar over the onions and seal the jars.
Store in a cool, dark cupboard for two weeks before eating.
Type the ingredients you want to use, then click Go. For better results you can use quotation marks around phrases (e.g. "chicken breast"). Alternatively you can search by chef, programme, cuisine, diet, or dish (e.g. Lasagne).