AppleScript名:asoc_レコード内の計算(最小)v2 |
— Created 2014-11-19 by Takaaki Naganoya — 2014 Piyomaru Software use AppleScript version "2.4" use scripting additions use framework "Foundation" set aCompanyRec to {employees:{{age:20, nameStr:"A"}, {age:23, nameStr:"B"}, {age:19, nameStr:"C"}}} set aDic to current application’s NSDictionary’s dictionaryWithDictionary:aCompanyRec set aveAge to (aDic’s valueForKeyPath:"employees.@min.age") set aveAgeNum to aveAge as real –> 19.0 |
More from my site
(Visited 21 times, 1 visits today)