First of all, get an iphone data recovery tool to restore your iPhone. If you don’t have one yet we have a recommendation: Aiseesoft FoneLab, a trustworthy program that allows you to preview and recover your contacts, SMS, notes, photos, old videos and more. All of this only requires a few steps and will allow you to restore your iPhone from the jailbreak.
Now start and run the program, these will be extracted and all of the backup files of your iDevices will show up, you have to pick iPhone and select the “Recover from iTunes backup File” mode to scan your backup copy from iTunes.
Select the appropriate backup file for your iPhone, you can pick the newest one and click “Start Scan” to get the right content in case you find more than one iTunes backup.
Now, you only have to pick “Contacts” from the menus on the left-hand side, and then you can see a preview of all of your contacts. You only have to select the contacts you want to retrieve and click “Recover” to save them to your computer.
Remember to backup your iPhone often. If you have not synced your iPhone with iTunes before the iOS jailbreak.