Hey there, got a quick one:
How would I be able to search for the json_object "Licence Type", when they key has a space in it?
Python:
class Customer:
def __init__(self, Name, Address, DOB, Licence Type):
self.name = Name
self.address = Address
self.dob = DOB
self.licence_type = Licence Type
#...
with open("Customers.json", "r") as fr:
customersFile = json.load(fr)
customersList = []
for json_object in customersFile:
customer = Customer(**json_object)
customersList.append(customer)
JSON:
[
{
"Name": "Jimmy Jones",
"Address": "123 Any Street Kilmarnock",
"DOB": "15/12/1975",
"Licence Type": "Manual"
},