import json # Read the JSON file with open('ff.json', 'r') as file: data = json.load(file) # Convert the list of dictionaries into a set of tuples unique_objects = set(tuple(obj.items()) for obj in data) # Convert the set of tuples back into a list of dictionaries filtered_data = [dict(obj) for obj in unique_objects] # Write the filtered data to a new JSON file with open('ff-limpio.json', 'w') as file: json.dump(filtered_data, file, indent=2)