简体   繁体   中英

Retrieving items from AppleScript record

I have an AppleScript record, myJSON, which I've created from a JSON entry using JSON Helper:

{"height":200.0,"width":300.0,"productoption":["fabric","rectangle","roll"],"id":33,"product":["backdrop"]}

I can easily access all the keys with a single entry by using, for example,

product of myJSON

I can't figure out how to access the productoption key which has a multiple entries.

Actually it's exactly the same way, the value for key productoption is an array ( list in AppleScript terms)

set options to productoption of myJSON
repeat with anOption in options
    display dialog anOption
end repeat

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM