ios - How to find sum of all objects for some key in array of dictionaries? -


this question has answer here:

i have array of dictionaries.

nsarray* mydicionariesarrey = ( object 1: { keytoculc: 30 } , object 2: { keytoculc: 40 } )

how find sum of objects keytoculc key in array, simple command? (30+40=70)

int sum = [mydicionariesarrey valueforkeypath:@"@sum.keytoculc"]; 

nb: untested, written memory.


Comments

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -