I have the data as below
{
"employeealias": "101613177",
"firstname": "Lion",
"lastname": "King",
"date": "2022-04-21",
"type": "Thoughtful Intake",
"subject": "Email: From You Success Coach"
}
{
"employeealias": "101613177",
"firstname": "Lion",
"lastname": "King",
"date": "2022-04-21",
"type": null,
"subject": "Call- CDL options & career assessment"
}
I need to create a dictionary like the below:
You have to create new dictionary with list and use
for
-loop to check if existsemployeealias
,firstname
,lastname
to add other information to sublist. If item doesn't exist then you have to create new item withemployeealias
,firstname
,lastname
and other information.EDIT:
You read lines as normal text but you have to convert text to dictonary using module json