Complex sentence: Robert had two other surviving sons, James (d.1775) and John, who were both clerks to the Presbyterian Church of Scotland's Assembly in Edinburgh, and a daughter, Janet (d.15 June 1779).
Split into simpler sentences: Robert had two other sons, James (d.1775) and John. He also had a daughter, Janet (d.15 June 1779).