Closed kpiatkowski closed 2 months ago
I have data that is incoming from 3rd party provider, and I need to transform properties to my internal structure and be able to export it that way too. Basically I just need to transform keys while importing.
class TestClass { @Expose({ name: "Test", toClassOnly: true }) public test: string; } const instance = plainToInstance(TestClass, { Test: "something" }); const plain = instanceToPlain(instance); console.log(instance); console.log(plain);
TestClass { test: 'something' } { test: 'something' }
TestClass { test: 'something' } { Test: 'something' }
Duplicate of https://github.com/typestack/class-transformer/issues/1324
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Description
I have data that is incoming from 3rd party provider, and I need to transform properties to my internal structure and be able to export it that way too. Basically I just need to transform keys while importing.
Expected behavior
Actual behavior