shakilsiraj / json-object-mapper

A TypeScript library to serialize and deserialize object graph from/to JSON in a fast and non-recursive way
MIT License
59 stars 17 forks source link

Computed Properties in mapper #46

Open pravin-d opened 4 years ago

pravin-d commented 4 years ago

Is it possible to have a computed property or maybe multiple names/alias as part of the json mapper ? Eg. Transformation

[{"id" : "someId"}, {"_id" : "sdfdf"}] => [{"id" : "someId"}, {"id" : "sdfdf"}]

Above I have 2 objects one with id and another with _id want to map both to id in the resulting object Also the cases file fullname = firstName + secondName