From 9023493d02ba2effa9954ab663f68087eacbc045 Mon Sep 17 00:00:00 2001 From: srgooglo Date: Wed, 7 Oct 2020 11:13:19 +0200 Subject: [PATCH] [added] GetPropertyValue => to core functions --- src/core/index.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/core/index.js b/src/core/index.js index c6eb1176..e4c5b8bc 100644 --- a/src/core/index.js +++ b/src/core/index.js @@ -174,6 +174,14 @@ export function downloadEncodedURI(payload){ errorHandlers.onError.internal_proccess(error) } } + +export function GetPropertyValue(object, dataToRetrieve) { + dataToRetrieve.split('.').forEach(function(token) { + if (object) object = object[token]; + }) + return object; +} + /** * Return the last object from array *