seperate directories and files in containts of json object