toJSON () {
        return _.reduce(this, function (accumulator, value, key) {
            if (value === undefined) { // true/false/null need to be preserved.
                return accumulator;
            }

            // Handle plurality of PropertyLists in the SDK vs the exported JSON.
            // Basically, removes the trailing "s" from key if the value is a property list.
            // eslint-disable-next-line @stylistic/js/max-len
            if (value && value._postman_propertyIsList && !value._postman_proprtyIsSerialisedAsPlural && _.endsWith(key, 's')) {
                key = key.slice(0, -1);
            }

            // Handle 'PropertyBase's
            if (value && _.isFunction(value.toJSON)) {
                accumulator[key] = value.toJSON();

                return accumulator;
            }

            // Handle Strings
            if (_.isString(value)) {
                accumulator[key] = value;

                return accumulator;
            }

            // Everything else
            accumulator[key] = _.cloneElement(value);

            return accumulator;
        }, {});
    }
Returns the JSON representation of a property, which conforms to the way it is defined in a collection.
You can use this method to get the instantaneous representation of any property, including a {@link Collection}.