Israel and Hamas completed their sixth exchange of hostages and prisoners after their ceasefire survived its latest crisis.