본문 바로가기
Python

폴더 안의 모든 json 문서 읽어서 특정값 추출 (파이썬)

by 앗사비 2015. 6. 17.
728x90
import glob
import json
import os

File_List = glob.glob('/Users/yoman/Documents/*.txt')

for i in File_List:
    f = open(i,'r')
    js = json.loads(f.read())
    print "id : %s" % (js['id'])
    f.close()
728x90