Add eventData back.

This commit is contained in:
Brian Cao 2023-03-23 00:36:38 -07:00
parent 30d2163610
commit 0d3c159084
9 changed files with 313 additions and 5 deletions

View file

@ -25,8 +25,18 @@ export function flattenJSON(
).keyValues;
}
export function getEventDataType(value: any): string {
let type: string = typeof value;
if ((type === 'string' && isValid(value)) || isValid(parseISO(value))) {
type = 'date';
}
return type;
}
function createKey(key, value, acc: { keyValues: any[]; parentKey: string }) {
const type = isValid(value) || isValid(parseISO(value)) ? 'date' : typeof value;
const type = getEventDataType(value);
let eventDataType = null;