+
+
+const getTagsIfExist = (dataKey: string, dataValue: string, vocabulary: any) => {
+ let k, v;
+ for (const key in vocabulary) {
+ if (vocabulary[key].labels.find(l=>l.label === dataKey)) {
+ k = key;
+ const { values } = vocabulary[key];
+ for (const val in values) {
+ if (values[val].labels.find(l=>l.label === dataValue)) {
+ v = val;
+ break;
+ }
+ }
+ }
+ }
+ return { key: k, value: v };
+};
\ No newline at end of file