Files
documentation/node_modules/@algolia/autocomplete-shared/dist/esm/getAttributeValueByPath.js
2024-03-22 03:47:51 +05:30

5 lines
154 B
JavaScript

export function getAttributeValueByPath(record, path) {
return path.reduce(function (current, key) {
return current && current[key];
}, record);
}