hash of array in objective-c, how?

Posted by Horace Ho on Stack Overflow See other posts from Stack Overflow or by Horace Ho
Published on 2010-05-20T04:40:05Z Indexed on 2010/05/20 4:50 UTC
Read the original article Hit count: 417

How is a hash of integer array can be represented in objective-c? Here is the ruby hash as an example:

hi_scores = { "John" => [1, 1000],
              "Mary" => [2, 8000],
              "Bob"  => [5, 2000] }

such that can be accessed by:

puts hi_scores["Mary"][1]
=> 8000

hopefully easy to serialize too. Thanks!

© Stack Overflow or respective owner

Related posts about objective-c

Related posts about data-structures