Skip to content
Snippets Groups Projects
Commit 31a6f6fa authored by Richter, Manuela's avatar Richter, Manuela
Browse files

start testing json data

parent 832cb913
No related branches found
No related tags found
No related merge requests found
{
"KPI":[
{"Name": "Attribut_1",
"Unit": "Percentage",
"Value": 43},
{"Name": "Attribut_2",
"Unit": "Percentage",
"Value": 56
}
]
}
\ No newline at end of file
# -*- coding: utf-8 -*-
"""
Created on Thu May 5 17:27:38 2022
@author: Richter
testfile for operating with json-files
"""
import json
with open("test_data.json","r+") as file:
data = json.load(file)
print(len(data))
print(type(data))
#print(data["Name"])
a = data.keys()
print(a)
print(type(a))
for i in a:
print(i)
key = data[i]
print(len(key))
print(type(key))
for j in key:
attrs = list(j)
print(len(attrs))
print(type(attrs))
print(attrs)
print(j)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment