Thinly slice the onion.
Crack the eggs into a bowl and mix with a pinch of salt.
Heat cooking oil in a pan and sauté the onion.
When the onion turns translucent, add the rice and mix well.
Add ketchup and stir-fry evenly.
Pour in the egg mixture, stirring gently to scramble.
Serve the rice in a bowl and top with the scrambled eggs to finish.