๐ฐconverting objects
JS โฉ value โฉ object โฉ convert
convert an object to other forms.
about .toJSON()
Object.prototype does not define
.toJSON()
.JSON.stringify() looks for
.toJSON()
on any object it is asked to serialize.if it exists, it is invoked, and the return value is serialized, instead of the original object.
Last updated