I am trying to get data into SAMPLES and LABELS variables from JSON objects which looks like this.
{
"samples": [
[
28,
25,
95
],
[
21,
13,
70
],
[
13,
21,
70
]
],
"labels": [
1,
2,
3
]
}
the code I am using
with open(data, 'r') as d:
complete_data = json.load(d)
for a in complete_data:
samples = a['samples']
lables = a['lables']
but its says
samples = a['samples']
TypeError: string indices must be integers
samples = complete_data['samples'], etc