added copy to clipboard functionality to Tree, in Actions and State tab

This commit is contained in:
Iliya Brook 2024-03-06 23:21:53 +02:00
parent 73618765a7
commit 8430b2ce8a
2 changed files with 2 additions and 2 deletions

View File

@ -1,6 +1,6 @@
import cloneDeep from 'lodash.clonedeep';
export const copyToClipboard = (object: any) => {
export function copyToClipboard(object: any){
try {
const deepCopiedObject = cloneDeep(object);
const jsonString = JSON.stringify(deepCopiedObject, null, 2);

View File

@ -1,4 +1,4 @@
export const getValueByPath = (obj: any, path: (string | number)[]) => {
export function getValueByPath(obj: any, path: (string | number)[]){
let current: any = obj;
for (let i = 0; i < path.length; i++) {
const key = path[i];