Peel and dice the oranges and grapefruit, add to a pan along with the juice. Stir in the gelling agent, bring to the boil, boil for approx. 1 min., stirring constantly. Add the sugar, bring to the boil and continue to boil for approx. 5 mins. on a medium heat, stirring constantly. Roughly chop the pistachios, add to the pan and bring to the boil.
While still boiling hot, ladle the jam into the clean, pre-warmed jars, fill the jars to just below the rim, seal immediately. Briefly upend the jars with screw-top lids, leave to cool on an insulating surface.