Use a replacer function in the JSON stringify method to define which values should be included or modify them.