Wash, peel and chop the pineapple into very small pieces.
Heat the frying pan, add oil, 1/2 tsp mustard seeds, urad dal and channa dal.
When the urad dal turns brown, add in slit green chili (or red chili) and curry leaves.
Add in chopped pineapple. Fry for 2 minutes.
Add in turmeric powder, salt, jaggery and water. Give a quick mix.
When it starts boiling reduce the flame. Close the lid and cook until soft by stirring occasionally.
When the pineapple is cooked, add in grated coconut and rasam powder.
Mix well and switch off the stove. Serve it with hot rice or chapathi.