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

package require http
package require json

http::config -accept "application/json"
set token [http::geturl http://musicbrainz.org/ws/2/release/817bfcee-a4ee-4afb-9314-9ae0e2885f57?inc=place-rels+release-groups]
set dic [json::json2dict [http::data $token]]

puts "title is [dict get $query title]"

# how to enter this one element dict?
dict get $query relations

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