-
-
Notifications
You must be signed in to change notification settings - Fork 16
Closed
Description
Is your feature request related to a problem? Please describe.
Destination configurations define values in a string dot notation like data.title. This can be unified to standardize access and minimize file size.
Describe the solution you'd like
Require a key as a string, and an object to read from.
Support wildcards, by adding an i parameter (like nested.*.data.title and 2 as the index)
Additional context
One function being used with wildcard:
// String dot notation for object ("data.id" -> { data: { id: 1 } })
const value = key.split('.').reduce((obj, key) => {
// Update the wildcard to the current nested index
if (key == '*') key = String(i);
return obj[key] || defaultValue;
}, event);
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels