Go to instagram on your phone → Accounts Centre → Your information and permissions → Export your information → Create export → Export to device → Customise information → Followers and following & click save → Select Date range: "All time" and Format: "JSON" → Start export.
Your data should be ready for download in a few minutes. After it is done, unzip and find the following and followers_1 JSON files.