function toJson(filename, saveToFileInput, accounts) {
  console.log(filename)
  console.log(saveToFileInput)

  if (saveToFileInput && filename) {
    console.log(`Saving to "${filename}"...`);
    saveToFile(filename, JSON.stringify(accounts, undefined, 4));
  } else {
    console.log("Not saving. Here is the data:");
    console.log(accounts);
    console.log("What you want to use as secret key in other password managers is ".yellow + "'totpSecret'".blue + ", not 'secret'!".yellow);
  }
}
Saves to json if the user said yes.
@param promptResult The results from the promt given to the user.
@param accounts A list of the auth accounts.