title: List directory to json format using jq
body: <p>I've tried to get linux list of my all files and directories in specified path to json format using ls and jq.</p>
  
  <p>Desired output:
  <a href="https://i.stack.imgur.com/P1Ipm.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/P1Ipm.png" alt="enter image description here"></a></p>
  
  <p>this is all what I have...
  ls | jq -R '[.]' | jq -s -c 'add'</p>
  
  <p>Is it possible to build output like above in the picture?</p>