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:

  1. transform json python dict (take here)

  2. parse dictionnary create new one, grouping dept section , appending items list. have many ways this. if need more explanation this, tell me.

  3. transform python dict json, done.


Comments

Popular posts from this blog

c++ - Difference between pre and post decrement in recursive function argument -

php - Nothing but 'run(); ' when browsing to my local project, how do I fix this? -

php - How can I echo out this array? -