toJSON() returns an object

because toJSON() returns an object therefore log out [object Object] instead of the actual JSON string.