Boil jackfruit in water until it cooks and softens. Drain the water left, if any. Let the jackfruit cool and then crush well with fingers or in a blender. 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 Urad dal, keep saute'ing until urad dal starts turning brown. Now, add crushed garlic, curry leaves and onion. Saute' again until onion gets tender.
Add in the crushed jackfruit and salt and saute' well for another 5 minutes.