Add logic to save search json.