如何计算键的所有字典中所有数字的总和,例如“小时”?
找不到任何相关信息。
这是我正在谈论的我的财产清单:
<plist version="1.0">
<array>
<dict>
<key>Address1</key>
<string>17 Stanley Road</string>
<key>Address2</key>
<string>Essex</string>
<key>City</key>
<string>Southend On Sea</string>
<key>Email</key>
<string>lmozdzen@gmail.com</string>
<key>Lessons</key>
<array>
<dict>
<key>LessonComment</key>
<string></string>
<key>LessonDate</key>
<string>05/06/2013</string>
<key>LessonHomework</key>
<string></string>
<key>LessonHours</key>
<integer>1</integer>
<key>LessonNext</key>
<string></string>
<key>LessonNumber</key>
<string>1</string>
<key>LessonTime</key>
<string></string>
</dict>
<dict>
<key>LessonComment</key>
<string>Ryun</string>
<key>LessonDate</key>
<string></string>
<key>LessonHomework</key>
<string>T</string>
<key>LessonHours</key>
<integer>2</integer>
<key>LessonNext</key>
<string>Ty</string>
<key>LessonNumber</key>
<string>4</string>
<key>LessonTime</key>
<string></string>
</dict>
</array>
我想要关键“LessonHours”的所有数字的总和