data-solution-automation-engine / data-warehouse-automation-metadata-schema

Generic interface exchange format for Data Warehouse Automation and ETL generation.
GNU Lesser General Public License v3.0
38 stars 11 forks source link

Develop handlebars function to support key/value searches in arrays/list. #12

Closed RoelantVos closed 1 year ago

RoelantVos commented 3 years ago

It would be convenient if we can use handlebars to use a list/arrays as a map. Retrieving values by index works fine, but it still feels a little brittle.

This could work like retrieving key or value information like a dictionary object in C#, or something like path.to.array.(key)’ would yield value, if the array looks like [{“key1”: “val1"}, {“key2”: “val2"}].

This way, each array can be queried through a value or key as opposed to position in the array.

RoelantVos commented 1 year ago

This is now in the handlebars extensions (exists, lookupExtension).