converts a directory tree of json files into a single json object or file