import json with open('bunny_data/missing_videos.json', 'r') as f: missing_videos = json.load(f) with open('bunny_data/allVideos.json', 'r') as f: all_videos = json.load(f) all_videos_guids = {video['guid'] for video in all_videos} for video in missing_videos: if video['guid'] in all_videos_guids: video['imported'] = True combined_data = { "missing_videos": missing_videos, "all_videos": all_videos } with open('bunny_data/combined_videos.json', 'w') as f: json.dump(combined_data, f, indent=4) print("Combined data has been written to bunny_data/combined_videos.json")