Creating an array in json with python -
i not adept json... have json file looks this:
{ "dept" : "aerospace , mechanical engineering.", "college" : "engineering", "etds" : ["1972","3","url"] }, { "dept" : "aerospace , mechanical engineering.", "college" : "engineering", "etds" : ["1971","3","url"] }, { "dept" : "plant sciences", "college" : "letters & science", "etds" : ["1970","6","url"] }, { "dept" : "plant sciences", "college" : "letters & science", "etds" : ["1969","2","url"] },
i loop through python (or else) such resulting file this:
{ "dept" : "aerospace , mechanical engineering.", "college" : "engineering", "etds" : [["1971","3","url"],["1972","3","url"]] }, { "dept" : "plant sciences", "college" : "letters & science", "etds" : [["1969","2","url"],["1970","6","url"]] },
sorted on college, dept, , combing entries "etds" element. know there way can't seem put together. advice great!
thanks!
there 3 steps want do:
transform json python dict (take here)
parse dictionnary create new one, grouping dept section , appending items list. have many ways this. if need more explanation this, tell me.
transform python dict json, done.
Comments
Post a Comment