Answer
Catherine, Duchess of Braganza was the paternal grandmother of John IV. Catherine, originally from Portugal, married Charles II, King of England, Scotland, and Ireland. Catherine and Charles had a son, James II and VII. John IV was the son of James II and VII, making Catherine his grandmother.