JerryLee

Results 1 comments of JerryLee

``` function normalize(str) { let arr = str.split(/[\[\]]/g).filter(Boolean); if(arr.length === 1) return {value:arr[0]} return arr.reduceRight(function(pre, curr, idx) { pre.value = curr return idx > 0 ? {chiledren: pre} : pre...