Saving data to LocalStorage as stringified JSON