Posted to tcl by davygrvy at Sun Aug 18 16:30:20 GMT 2019view raw

  1. package require http
  2. package require json
  3.  
  4. http::config -accept "application/json"
  5. set token [http::geturl http://musicbrainz.org/ws/2/release/817bfcee-a4ee-4afb-9314-9ae0e2885f57?inc=place-rels+release-groups]
  6. set dic [json::json2dict [http::data $token]]
  7.  
  8. puts "title is [dict get $query title]"
  9.  
  10. # how to enter this one element dict?
  11. dict get $query relations
  12.  
  13.  

Comments

Posted by davygrvy at Sun Aug 18 16:41:02 GMT 2019 [text] [code]

Ok, nevermind, got it. set relation [lindex [dict get $query relations] 0] % dict get $relation place name Dallas Memorial Auditorium