saving unique results to json file