diff options
author | Timoney, Dan (dt5972) <dtimoney@att.com> | 2018-11-06 14:15:05 -0500 |
---|---|---|
committer | Timoney, Dan (dt5972) <dtimoney@att.com> | 2018-11-06 14:16:18 -0500 |
commit | d9642fafddbaa28789339e1989c4583af003a193 (patch) | |
tree | 0442af1ba4e793433fac5871dd8e69c98a056446 /dgbuilder/public/util/js/jsonTool.js | |
parent | 33d814f236d4c3e4246851c810bdbbab5090abbb (diff) |
Fix license issues
Fix license definition in package.json files
Remove obsolete dgbuilder from SDNC (dgbuilder now in CCSDK)
Change-Id: Iee0bf9468f081c5957eae2e873efbea6fb6be354
Issue-ID: SDNC-489
Signed-off-by: Timoney, Dan (dt5972) <dtimoney@att.com>
Former-commit-id: 4e104ac4183dd46124753c4571939e765a124508
Diffstat (limited to 'dgbuilder/public/util/js/jsonTool.js')
-rw-r--r-- | dgbuilder/public/util/js/jsonTool.js | 67 |
1 files changed, 0 insertions, 67 deletions
diff --git a/dgbuilder/public/util/js/jsonTool.js b/dgbuilder/public/util/js/jsonTool.js deleted file mode 100644 index f4d0de36..00000000 --- a/dgbuilder/public/util/js/jsonTool.js +++ /dev/null @@ -1,67 +0,0 @@ -var obj={}; -function dotToJson(str,value,obj){ - //var objArr = path.split("."), part; - var objArr = str.split("."); - var prevStr; - var currObj; - var prevObj; - console.log(str); - for(var i=0;i<objArr.length -1;i++){ - var subStr= objArr[i] ; - //console.log("subStr:" + subStr); - if(i==0 && obj[subStr] == undefined ){ - obj[subStr] = {}; - currObj= obj[subStr]; - }else if(i==0 && obj[subStr] != undefined ){ - currObj=obj[subStr]; - //console.log("in gkjgjkg"); - }else{ - if(i == 1){ - prevObj=obj[prevStr]; - if(prevObj[subStr] == undefined){ - prevObj[subStr] = {}; - currObj = prevObj[subStr]; - }else{ - currObj = prevObj[subStr]; - } - }else{ - if(prevObj[subStr] == undefined){ - prevObj[subStr] = {}; - currObj = prevObj[subStr]; - }else{ - currObj = prevObj[subStr]; - } - } - //console.dir(currObj); - } - prevStr=subStr; - if(i <objArr.length-2){ - prevObj=currObj; - } - } - var lastStr = objArr[objArr.length-1]; - currObj[lastStr] = value; - //prevObj[lastStr] = value; - //console.dir(currObj); - return obj; -} -n=dotToJson('abcfdfghdghdghdghdhdhd.efhfjhfjhfjhfjhfjhfjhfbg.hfjhfjhfjhfjhfjhfjh.l',"1234",obj); -//console.dir(n); -JSON.stringify(n,undefined,2); -m=dotToJson('abc.ebg.h.n',"5678",n); -console.dir(m); -function printObj(obj){ -for( j in obj){ - console.log(j + ":" + obj[j]); - if(typeof obj[j] == "object" ){ - printObj(obj[j]); - } - -} -} -printObj(m); -a=JSON.parse(JSON.stringify(m,null,2)); -console.dir(a); - - -//console.log (stringToObj('abc.ebg.h',"",{})); |