Boil jackfruit until it cooks and softens. Drain, let cool then crush with fingers. Make sure it does not get mashed, but only coarsely crushed.
Heat oil in a deep pan. Add mustard seeds and let splutter. Add red chili flakes and lentils, and saute until lentils start to brown. Add crushed garlic, curry leaves and onion. Saute until onion is tender.
Add in the crushed jackfruit and salt and saute another 5 minutes.