// Nested attributes are referenced in the form of `attribute.nestedAttribute` // Where `attribute` is the parent attribute of type Element // and `nestedAttribute` refers to an `attribute` of the Element value // i.e. Element Car has an `owner` attribute type element with an element value (Jozko Mrkvicka). // The nested attribute would be `owner.element_name` and the value would be `Jozko Mrkvicka` // Below are helper functions to determine if an attribute is nested and to parse the nested attribute export const isNestedAttribute = (key: string) => key.includes(".") && !key.includes(".value"); // Only 1 level of nesting is supported export const parseNestedAttribute = (key: string): [string, string] => { const [ate, nestedAttribute] = key.split("."); return [ate, nestedAttribute]; };