Open
Description
I was trying to transform dynamic object props, but can't figure it out. Let's assume we have an object with dynamic props as following:
info_details: {[randomId]: {user_names: [ 'Julia', 'Alex' ] } }
The problem:
Normally we would use something like this:
class A {
@Expose({ name: 'user_names' })
userNames!: string[];
}
class B {
@Expose({ name: 'info_details' })
@Type(() => A)
infoDetails!: A;
}
But in the case when randomId
is a dynamic prop and we cannot define a class to it I don't really know what would be the best way to parse that object. Could you help please?