Peel the skin off the eggplants (if bitter you have to soak in water overnight).
Place eggplants in a large saucepan/pot and cover with water, bring to boil then change the water to remove bitterness.
Again cover with fresh water, bring to boil then lower the heat to a simmer, add sugar, cinnamon sticks, cloves, and cardamom if using and simmer for 20 minutes.
Remove from heat, cover with a lid, and let the mixture sit at room temperature until the next day.
On the next day, place the saucepan or pot with the jam on medium heat for about 20 minutes and allow to simmer. Remove from heat.
On the third day, repeat the same steps as the second day, and at the end the add juice of one lemon, and walnuts, and remove from heat. Let the jam sit for about 20 minutes. Pour into sterilized jars and seal.