Hi all!!
I am looking for some data structure which will store data in terms of key and value and where one key corresponds to one or more than one value.
So , something like:
KEY VALUE
key1 value1
key1 value2
key1 value3
key2 value4
key2 value5
...... ..........
and on query all VALUE for a particular KEY is obtained in array.
I tried implementing NSDictionary but I am able to save on one to one basis only Multiple values for one ley is not possible.
Kindly help
or say that I have three keys (string type)like: key1,key2 and key3 and corresponding to each I have three arrays (NSarray type) array1, array2 and array3
So i want to map these as key and values:
key1 ---------> array1
key2----------> array2
key3----------> array3
So that from this structure, whenever VALUE for KEY (say key1) is queried, array1 (and so on) is returned.
I am looking for some data structure which will store data in terms of key and value and where one key corresponds to one or more than one value.
So , something like:
KEY VALUE
key1 value1
key1 value2
key1 value3
key2 value4
key2 value5
...... ..........
and on query all VALUE for a particular KEY is obtained in array.
I tried implementing NSDictionary but I am able to save on one to one basis only Multiple values for one ley is not possible.
Kindly help
or say that I have three keys (string type)like: key1,key2 and key3 and corresponding to each I have three arrays (NSarray type) array1, array2 and array3
So i want to map these as key and values:
key1 ---------> array1
key2----------> array2
key3----------> array3
So that from this structure, whenever VALUE for KEY (say key1) is queried, array1 (and so on) is returned.
Last edited by a moderator: