export function findObjectByPath(arr, targetPath) {
    targetPath = decodeURIComponent(targetPath)
    for (let i = 0; i < arr.length; i++) {
        const obj = arr[i];
        if (obj.path.startsWith("/tjmchild" + targetPath)) {
            return obj;
        }
        if (obj.children && obj.children.length > 0) {
            const result = findObjectByPath(obj.children, targetPath);
            if (result) {
                return result;
            }
        }
    }
    return null;
}