This commit is contained in:
Michael Lumish 2020-07-21 10:10:51 -07:00
parent a3762259a1
commit 6b03311475

View File

@ -134,12 +134,12 @@ function getStructFromJson(obj: any): Struct {
if (typeof obj !== 'object' || obj === null) {
throw new Error('Invalid JSON object for Struct field');
}
const fields: {[key: string]: Value} = {};
const fields: { [key: string]: Value } = {};
for (const [fieldName, value] of Object.entries(obj)) {
fields[fieldName] = validateValue(value);
}
return {
fields
fields,
};
}