{
"data": [
{
"data": [
null,
null,
30,
45,
69,
70,
65
],
"title": "title5"
},
{
"data": [
null,
5,
10,
15,
22,
30
],
"title": "title4"
},
{
"data": [
40,
55,
],
"title": "title3"
},
{
"data": [
null,
89,
90,
85
],
"title": "title2"
},
{
"data": [
66,
77,
55,
33,
50,
-6,
-8
],
"title": "title1"
}
],
"x_labels": [
6,
7,
8,
9,
10,
11,
12
]
}
I want my dictionary to have same key called “data” and “title” for each set of values it contains as shown by above code.
But when I try to create a dictionary and try using setValue:forKey: method for the same key or addEntriesFromDictionary: it overwrites each set of data and finally I only get the last set of data which I pushed into my dictionary.
Is there a way, I can do this?
Notice that the first object in the lowest-level dictionary is a list or array. This is the key.
Now you can add individual inner dictionaries to the array, each of which has the same keys: