Drain the pineapple and collect the juice. Cut the pineapple into small pieces. Peel and finely dice onion
Heat 2oil in a pot. Sauté the onion in it. Add pineapple and pineapple juice and let it boil down for 25-30 minutes at low heat while stirring. Season to taste with salt, chilli and vinegar. Garnish with the chilli pepper if necessary