I have a json file called test.json
[
{
"uuid": "4c85cb89-88bb-4019-81ee-1215363c9e9a",
"ulid": "01FX3473AG0WJHEQ29A62HGQA9"
},
{
"uuid": "1d5af2a4-9ed4-4f96-996c-6d1580a691b4",
"ulid": "01FX34BBRC5P3C1ECMDG9Q5VJQ"
}
]
How do I parse this json file ?
One object at a time.
So the first json object is with uuid that starts with 4c85 and the second one is with 1d5
My expected output is from the json array
I need to get individual objects and then do something with the keys of the object.
So far my code is not working because
with open("test.json", encoding="utf-8") as f:
for line in f.readlines():
print(line)
Its getting the whole array as a line.