我目前有类似的东西
(Desktop) 1 % dict set mymap keyA "KeyA value"
keyA {KeyA value}
(Desktop) 2 % dict set mymap keyB "KeyB value"
keyA {KeyA value} keyB {KeyB value}
(Desktop) 3 % dict get $mymap keyB
KeyB value
(Desktop) 4 % dict set mymap keyC {KeyD "keyD Value"}
keyA {KeyA value} keyB {KeyB value} keyC {KeyD "keyD Value"}
(Desktop) 5 % dict get $mymap keyC.keyD
key "keyC.keyD" not known in dictionary
keyC基本上包含另一个字典。该字典有一个名为keyD的密钥,其值为"密钥值" 。我怎样才能获得keyD的值?我试过了keyC.keyD
更新:
我需要这个的原因是因为我有类似的东西
(Desktop) 20 % puts $mymap
{$schema} http://json-schema.org/draft-04/schema# title Product description {A product from Acme's catalog} type object properties {id {description {The unique identifier for a product} type integer}} required id
我需要id中的描述值。以上是转换为字典的json对象