title: Build Parent Child Array using File Path StringArray
body: <p>I have a list of file paths as String Array or List of Strings</p>
  
  <pre><code>Example,
    /A/B/C/D/1.txt
    /A/E/F/D
    /B/F/F/D
    /A/B/C/D/R/3.txt
  </code></pre>
  
  <p>I need to build a a json structure as hierarchy or parent child array so that i can build the json structure</p>
  
  <pre><code> Example,
     A: [
       children:[
      {
         reference:"B": [
            children:[ 
               reference:"C"
            ]
         ]
      }     
     ]
     ........
  </code></pre>
  
  <p>Please help me with your suggestions </p>