The task is quite simple.
There is a bug in this code that whenever an iCloud user has more than 500 contacts it won't work.
There should be some sort of pagination problem in the JSON Parsing.
The code works correctly for 500 contacts, the issue is over 500.
CODE HERE : [url removed, login to view]