Get Hash
Valid
class User {
public id: string;
public name: string;
}
const USER_META = new ObjectMeta<User>({
builder: User,
getHash: ({ id }) => id,
fields: {
id: new StringField(),
name: new StringField(),
}
});
const values = [
{
id: `1`,
name: `Vasya`,
},
{
id: `2`,
name: `Masha`,
},
];
const result = JTC.convert({
id: `Get Hash - Valid`,
meta: new ObjectArrayMeta({ meta: USER_META }),
values
});
const users = result.converted.all;
console.log(users);Corrupted
Last updated