How to grouping dictionary keys by value in json - python

I have this json file which has some data like this:
[
{
"stats": [
{
"city": "'s",
"latitude": "51",
"longitude": "5",
"region": "Europe",
"date_range": "date_all_time",
},
{
"city": "'s",
"latitude": "5",
"longitude": "5.67",
"region": "Europe",
"date_range": "date_last_year",
},
{
"city": "Aalborg",
"latitude": "57.03",
"longitude": "9.007",
"region": "Europe",
"date_range": "date_all_time",
},
{
"city": "Aalborg",
"latitude": "57.033",
"longitude": "9.0007",
"region": "Europe",
"date_range": "date_last_year",
},
{
"city": "Aalborg",
"latitude": "57.0",
"longitude": "9.97",
"region": "Europe",
"date_range": "date_last_month",
},
{
"city": "Aarau",
"latitude": "47.32",
"longitude": "8.05",
"region": "Europe",
"date_range": "date_last_year",
},
And I want to group all the Date Range which has same value say "date_range": "date_last_year". I was trying this code but when I try to print the values, its showing like this "The filtered dictionary is : {}".
Please help me, I'm just a beginner to learn json and python. Thank you
def convert_object():
res = dict((k, finaljson[k]) for k in ['Date_Range']
if k in finaljson)
print("The filtered dictionary is : " + str(res))
The Actual result/Outpu I want is like this, all date_last_year values:
{
"city": "'s",
"latitude": "51",
"longitude": "5",
"region": "Europe",
"date_range": "date_last_year",
},
{
"city": "'s",
"latitude": "5",
"longitude": "5.67",
"region": "Europe",
"date_range": "date_last_year",
},
{
"city": "Aalborg",
"latitude": "57.03",
"longitude": "9.007",
"region": "Europe",
"date_range": "date_last_year",
},
{
"city": "Aalborg",
"latitude": "57.033",
"longitude": "9.0007",
"region": "Europe",
"date_range": "date_last_year",
},
{
"city": "Aalborg",
"latitude": "57.0",
"longitude": "9.97",
"region": "Europe",
"date_range": "date_last_year",
},
{
"city": "Aarau",
"latitude": "47.32",
"longitude": "8.05",
"region": "Europe",
"date_range": "date_last_year",
},

Assuming you have "data" as a list with your data.
final_json = dict()
for obj in data:
if obj['date_range'] in final_json:
final_json[obj['date_range']].append(obj)
else:
final_json[obj['date_range']] = [obj]
import json
print(json.dumps(final_json, indent=4))

This of json as a nested dictionary where each level is an indice.

Related

Json_normalize with meta data

{
"generated_at": "2022-09-19T15:30:42+00:00",
"sport_schedule_sport_event_markets": [{
"sport_event": {
"id": "sr:sport_event:33623209",
"start_time": "2022-09-18T17:00:00+00:00",
"start_time_confirmed": true,
"competitors": [{
"id": "sr:competitor:4413",
"name": "Baltimore Ravens",
"country": "USA",
"country_code": "USA",
"abbreviation": "BAL",
"qualifier": "home",
"rotation_number": 264
}, {
"id": "sr:competitor:4287",
"name": "Miami Dolphins",
"country": "USA",
"country_code": "USA",
"abbreviation": "MIA",
"qualifier": "away",
"rotation_number": 263
}]
},
"markets": [{
"id": "sr:market:1",
"name": "1x2",
"books": [{
"id": "sr:book:18149",
"name": "DraftKings",
"removed": true,
"external_sport_event_id": "180327504",
"external_market_id": "120498143",
"outcomes": [{
"id": "sr:outcome:1",
"type": "home",
"odds_decimal": "1.13",
"odds_american": "-800",
"odds_fraction": "1\/8",
"open_odds_decimal": "1.37",
"open_odds_american": "-270",
"open_odds_fraction": "10\/27",
"external_outcome_id": "0QA120498143#1341135376_13L88808Q1468Q20",
"removed": true
}, {
"id": "sr:outcome:2",
"type": "draw",
"odds_decimal": "31.00",
"odds_american": "+3000",
"odds_fraction": "30\/1",
"open_odds_decimal": "36.00",
"open_odds_american": "+3500",
"open_odds_fraction": "35\/1",
"external_outcome_id": "0QA120498143#1341135377_13L88808Q10Q22",
"removed": true
}, {
"id": "sr:outcome:3",
"type": "away",
"odds_decimal": "6.00",
"odds_american": "+500",
"odds_fraction": "5\/1",
"open_odds_decimal": "2.95",
"open_odds_american": "+195",
"open_odds_fraction": "39\/20",
"external_outcome_id": "0QA120498143#1341135378_13L88808Q1329Q21",
"removed": true
}]
I'm trying to get outcomes as the main table and sport event ID at the metaID. below is not working
#df =pd.json_normalize(data,record_path=['sport_schedule_sport_event_markets','markets','books','outcomes'],meta=[['sport_schedule_sport_event_markets','sport_event']],meta_prefix='game_',errors='ignore')

I need to loop over a big JSON - Pandas/Python

I have a JSON file that looks like this:
[ {
"id": 121,
"name": "Lebanon",
"iso3": "LBN",
"iso2": "LB",
"numeric_code": "422",
"phone_code": "961",
"capital": "Beirut",
"currency": "LBP",
"currency_name": "Lebanese pound",
"currency_symbol": "£",
"tld": ".lb",
"native": "لبنان",
"region": "Asia",
"subregion": "Western Asia",
"timezones": [
{
"zoneName": "Asia\/Beirut",
"gmtOffset": 7200,
"gmtOffsetName": "UTC+02:00",
"abbreviation": "EET",
"tzName": "Eastern European Time"
}
],
"translations": {
"kr": "레바논",
"br": "Líbano",
"pt": "Líbano",
"nl": "Libanon",
"hr": "Libanon",
"fa": "لبنان",
"de": "Libanon",
"es": "Líbano",
"fr": "Liban",
"ja": "レバノン",
"it": "Libano",
"cn": "黎巴嫩",
"tr": "Lübnan"
},
"latitude": "33.83333333",
"longitude": "35.83333333",
"emoji": "🇱🇧",
"emojiU": "U+1F1F1 U+1F1E7",
"states": [
{
"id": 2285,
"name": "Akkar Governorate",
"state_code": "AK",
"latitude": "34.53287630",
"longitude": "36.13281320",
"type": null,
"cities": [
{
"id": 65939,
"name": "Caza de Aakkar",
"latitude": "34.53333000",
"longitude": "36.16667000"
}
]
},
{
"id": 2283,
"name": "Baalbek-Hermel Governorate",
"state_code": "BH",
"latitude": "34.26585560",
"longitude": "36.34980970",
"type": null,
"cities": [
{
"id": 65933,
"name": "Baalbek",
"latitude": "34.00583000",
"longitude": "36.21806000"
},
{
"id": 65941,
"name": "Caza de Baalbek",
"latitude": "34.09822000",
"longitude": "36.27157000"
}
]
},
{
"id": 2286,
"name": "Beirut Governorate",
"state_code": "BA",
"latitude": "33.88861060",
"longitude": "35.49547720",
"type": null,
"cities": [
{
"id": 65936,
"name": "Beirut",
"latitude": "33.89332000",
"longitude": "35.50157000"
},
{
"id": 65951,
"name": "Ra’s Bayrūt",
"latitude": "33.90000000",
"longitude": "35.48333000"
}
]
},
{
"id": 2287,
"name": "Beqaa Governorate",
"state_code": "BI",
"latitude": "33.84626620",
"longitude": "35.90194890",
"type": null,
"cities": [
{
"id": 65930,
"name": "Aanjar",
"latitude": "33.72778000",
"longitude": "35.93111000"
},
{
"id": 65955,
"name": "Zahlé",
"latitude": "33.84675000",
"longitude": "35.90203000"
}
]
},
{
"id": 2282,
"name": "Mount Lebanon Governorate",
"state_code": "JL",
"latitude": "33.81008580",
"longitude": "35.59731390",
"type": null,
"cities": [
{
"id": 65932,
"name": "Baabda",
"latitude": "33.83389000",
"longitude": "35.54417000"
},
{
"id": 65937,
"name": "Bhamdoun",
"latitude": "33.79500000",
"longitude": "35.65111000"
},
{
"id": 65938,
"name": "Bhamdoûn el Mhatta",
"latitude": "33.80861000",
"longitude": "35.65972000"
},
{
"id": 65940,
"name": "Caza de Baabda",
"latitude": "33.84592000",
"longitude": "35.66791000"
},
{
"id": 65947,
"name": "Jbaïl",
"latitude": "34.12111000",
"longitude": "35.64806000"
},
{
"id": 65948,
"name": "Jounieh",
"latitude": "33.98083000",
"longitude": "35.61778000"
}
]
},
{
"id": 2288,
"name": "Nabatieh Governorate",
"state_code": "NA",
"latitude": "33.37716930",
"longitude": "35.48382930",
"type": null,
"cities": [
{
"id": 65931,
"name": "Ain Ebel",
"latitude": "33.11023000",
"longitude": "35.40251000"
},
{
"id": 65942,
"name": "Caza de Bent Jbaïl",
"latitude": "33.15964000",
"longitude": "35.41137000"
},
{
"id": 65943,
"name": "Caza de Nabatîyé",
"latitude": "33.39435000",
"longitude": "35.44483000"
},
{
"id": 65946,
"name": "Habboûch",
"latitude": "33.40729000",
"longitude": "35.48169000"
},
{
"id": 65949,
"name": "Marjayoûn",
"latitude": "33.36028000",
"longitude": "35.59111000"
},
{
"id": 65950,
"name": "Nabatîyé et Tahta",
"latitude": "33.37889000",
"longitude": "35.48389000"
}
]
},
{
"id": 2284,
"name": "North Governorate",
"state_code": "AS",
"latitude": "34.43806250",
"longitude": "35.83082330",
"type": null,
"cities": [
{
"id": 65934,
"name": "Batroûn",
"latitude": "34.25528000",
"longitude": "35.65806000"
},
{
"id": 65935,
"name": "Bcharré",
"latitude": "34.25083000",
"longitude": "36.01056000"
},
{
"id": 65953,
"name": "Tripoli",
"latitude": "34.43352000",
"longitude": "35.84415000"
}
]
},
{
"id": 2281,
"name": "South Governorate",
"state_code": "JA",
"latitude": "33.27214790",
"longitude": "35.20327780",
"type": null,
"cities": [
{
"id": 65944,
"name": "En Nâqoûra",
"latitude": "33.11806000",
"longitude": "35.13972000"
},
{
"id": 65945,
"name": "Ghazieh",
"latitude": "33.51750000",
"longitude": "35.36889000"
},
{
"id": 65952,
"name": "Sidon",
"latitude": "33.55751000",
"longitude": "35.37148000"
},
{
"id": 65954,
"name": "Tyre",
"latitude": "33.27333000",
"longitude": "35.19389000"
}
]
}
]
}
]
How can I access states > name ?
For example, I need Akkar Governorate from
"states": [
{
"id": 2285,
"name": "Akkar Governorate",
"state_code": "AK",
"latitude": "34.53287630",
"longitude": "36.13281320",
"type": null,
"cities": [
{
"id": 65939,
"name": "Caza de Aakkar",
"latitude": "34.53333000",
"longitude": "36.16667000"
}
]
}
]
How can I manage a loop to do that?
Use:
yourJsonObj = json.loads("your json string")
for key, val in yourJsonObj
Access/Manipulate data
Here are more examples:
JSON Read, write, parse
Good luck!
First you need to:
with open(r"C:\Users\Bar\AppData\Local\Programs\Python\Python310\Scripts\contries+states+cities.json", encoding="utf8") as f:
data = json.loads(f.read())
You can read name like this:
data[0]['states'][1]['name'] #hierarchy way
also you can even perform following kind of Coding:
def get_data(name):
for i in range(len( data[0]['states'])):
if data[0]['states'][i]['name'] == name:
print(data[0]['states'][i])
get_data('Akkar Governorate')

How to compare two list of dictionary and update value from another [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed last year.
Improve this question
list_1 = [
{ "id": "11", "name": "son", "email": "n#network.com", "type": "Owner" },
{ "id": "11", "name": "son", "email": "n#network.com", "type": "Manager" },
{ "id": "21", "name": "abc", "email": "abc#network.com", "type": "Employ" },
{ "id": "21", "name": "abc", "email": "abc#network.com", "type": "Manager" },
{ "id": "11", "name": "son", "email": "n#network.com", "type": "Manager" },
{ "id": "100", "name": "last", "email": "last#network.com", "type": "Manager" }
]
list_2 = [
{ "id": "11", "name": "son", "email": "n#network.com", "type": "Manager" },
{ "id": "11", "name": "son", "email": "n#network.com", "type": "Manager" },
{ "id": "21", "name": "abc", "email": "abc#network.com", "type": "Employ" },
{ "id": "52", "name": "abcded", "email": "abcded#network.com", "type": "Manager" }
]
A preference dictionary {'Owner': 1, 'Manager':2, 'employ':3, 'HR': 4 }
There are two list of dictionaries
list_1 is the primary_dictionary, list_2 is the secondary_dictionary
I need to update the role in list_1 dictionary if the 'email' present in secondary dictionary with respect to check in preference dictionary
In the end output i should contain 'type' as in preference dictionary
If any emails match I want to update list one at all places with that email to contain a new role under'type'. for example if 123#gmail.com was in a dictionary within list2 then I want to change every item in list1 that contains 123#gmail.com as the email to have a role that is determined by a selection from the preference dictionary.
Expected out
[
{'id': '11', 'name': 'son', 'email': 'n#network.com', 'type': 'Owner'},
{'id': '21', 'name': 'abc', 'email': 'abc#network.com', 'type': 'Manager'},
{"id": "100", "name": "last", "email": "last#network.com", "type": "Manager"}
]
Code is below
for each1 in list_1:
for each2 in list_2:
if each1['email'] == each2['email']:
# Update the list_1 dictionary with respect to preference
Given the following inputs:
list_1 = [
{ "id": "11", "name": "son", "email": "n#network.com", "type": "Owner" },
{ "id": "11", "name": "son", "email": "n#network.com", "type": "Manager" },
{ "id": "21", "name": "abc", "email": "abc#network.com", "type": "Employ" },
{ "id": "21", "name": "abc", "email": "abc#network.com", "type": "Manager" },
{ "id": "11", "name": "son", "email": "n#network.com", "type": "Manager" },
{ "id": "100", "name": "last", "email": "last#network.com", "type": "Manager" }
]
list_2 = [
{ "id": "11", "name": "son", "email": "n#network.com", "type": "Manager" },
{ "id": "11", "name": "son", "email": "n#network.com", "type": "Manager" },
{ "id": "21", "name": "abc", "email": "abc#network.com", "type": "Employ" },
{ "id": "52", "name": "abcded", "email": "abcded#network.com", "type": "Manager" }
]
preference = {'Owner': 1, 'Manager':2, 'Employ':3, 'HR': 4 }
I would start by reshaping list_2 into something more useable. This will get rid of the duplicates leaving us just the "best" type for each email:
list_2_lookup = {}
for item in list_2:
key, value = item["email"], item["type"]
list_2_lookup.setdefault(key, value)
if preference[value] < preference[list_2_lookup[key]]:
list_2_lookup[key] = value
Then we can iterate over the items in the first list and use the lookup we just created. Note, this is a little more convoluted than might be needed as it is not clear from your question and your expected result what items from list_1 should actually appear in the output. I have tried to match your stated output.
result = {}
for item in list_1:
key = item["email"]
result.setdefault(key, item)
if preference[result[key]["type"]] > preference[item["type"]]:
result[key]["type"] = item["type"]
if preference[result[key]["type"]] > preference.get(list_2_lookup.get(key), 99):
result[key]["type"] = list_2_lookup.get(key)
At this point we can:
print(list(result.values()))
Giving us:
[
{'id': '11', 'name': 'son', 'email': 'n#network.com', 'type': 'Owner'},
{'id': '21', 'name': 'abc', 'email': 'abc#network.com', 'type': 'Manager'},
{'id': '100', 'name': 'last', 'email': 'last#network.com', 'type': 'Manager'}
]
Here is code that will do the following:
If any emails match update list one at all places with that email to contain a new role under 'type'. for example if 123#gmail.com was in a dictionary within list2 then it will change change every item in list1 that contains 123#gmail.com as the email to have a role that is determined by a selection from the preference dictionary.
list_1 = [
{ "id": "11", "name": "son", "email": "n#network.com", "type": "Owner" },
{ "id": "11", "name": "son", "email": "n#network.com", "type": "Manager" },
{ "id": "21", "name": "abc", "email": "abc#network.com", "type": "Employ" },
{ "id": "21", "name": "abc", "email": "abc#network.com", "type": "Manager" },
{ "id": "11", "name": "son", "email": "n#network.com", "type": "Manager" },
{ "id": "100", "name": "last", "email": "last#network.com", "type": "Manager" }
]
list_2 = [
{ "id": "11", "name": "son", "email": "n#network.com", "type": "Manager" },
{ "id": "11", "name": "son", "email": "n#network.com", "type": "Manager" },
{ "id": "21", "name": "abc", "email": "abc#network.com", "type": "Employ" },
{ "id": "52", "name": "abcded", "email": "abcded#network.com", "type": "Manager" }
]
pref = {1: 'owner', 2: 'Manager', 3: 'employ', 4: 'HR' }
choice = 1
idx1 = -1
for each1 in list_1:
idx1 += 1
for each2 in list_2:
if each1['email'] == each2['email']:
print(list_1[idx1]['type'])
print(pref[choice])
list_1[idx1]['type'] = pref[choice]
print(list_1)

Plotting image on maps with Vega-Lite / Altair

Edit: bug report here
I am trying to display images on maps. For the example, let's say I want tomake a map with regions and their coats of arms. There is a simple example below.
The text appears (Vega-Lite editor) but the images only appear with the x and y channels, not with latitude and longitude.
Is this about me, about a known limitation, or about a bug?
Linked question: is it possible to use SVG files rather than PNG ?
{
"config": {"view": {"continuousWidth": 300, "continuousHeight": 400}},
"layer": [
{
"mark": {"type": "text", "font": "Ubuntu", "fontSize": 18},
"encoding": {
"latitude": {"field": "latitude", "type": "quantitative"},
"longitude": {"field": "longitude", "type": "quantitative"},
"text": {"type": "nominal", "field": "name"}
}
},
{
"mark": {"type": "image", "height": 50, "width": 50},
"encoding": {
"latitude": {"field": "latitude", "type": "quantitative"},
"longitude": {"field": "longitude", "type": "quantitative"},
"url": {"type": "nominal", "field": "url"}
}
}
],
"data": {"name": "data"},
"$schema": "https://vega.github.io/schema/vega-lite/v5.0.0.json",
"datasets": {
"data": [
{
"name": "Unterfranken",
"wikidata": "Q10547",
"latitude": 50.011166583816824,
"longitude": 9.94760069351192,
"url": "https://upload.wikimedia.org/wikipedia/commons/thumb/b/b6/Unterfranken_Wappen.svg/512px-Unterfranken_Wappen.svg.png"
},
{
"name": "Oberfranken",
"wikidata": "Q10554",
"latitude": 50.05097220003501,
"longitude": 11.376017810598547,
"url": "https://upload.wikimedia.org/wikipedia/commons/thumb/0/06/Wappen_Bezirk_Oberfranken2.svg/500px-Wappen_Bezirk_Oberfranken2.svg.png"
},
{
"name": "Niederbayern",
"wikidata": "Q10559",
"latitude": 48.70663162458262,
"longitude": 12.78636846158091,
"url": "https://upload.wikimedia.org/wikipedia/commons/thumb/7/78/Wappen_Bezirk_Niederbayern.svg/352px-Wappen_Bezirk_Niederbayern.svg.png"
},
{
"name": "Oberpfalz",
"wikidata": "Q10555",
"latitude": 49.399491050485366,
"longitude": 12.117024154659765,
"url": "https://upload.wikimedia.org/wikipedia/commons/thumb/1/18/Wappen_Oberpfalz.svg/177px-Wappen_Oberpfalz.svg.png"
},
{
"name": "Mittelfranken",
"wikidata": "Q10551",
"latitude": 49.348122683559716,
"longitude": 10.786147287006969,
"url": "https://upload.wikimedia.org/wikipedia/commons/thumb/8/8d/Mittelfranken_Wappen.svg/393px-Mittelfranken_Wappen.svg.png"
},
{
"name": "Schwaben",
"wikidata": "Q10557",
"latitude": 48.1625551901062,
"longitude": 10.519367235613796,
"url": "https://upload.wikimedia.org/wikipedia/commons/thumb/5/55/Wappen_Schwaben_Bayern.svg/450px-Wappen_Schwaben_Bayern.svg.png"
},
{
"name": "Oberbayern",
"wikidata": "Q10562",
"latitude": 48.10116954364846,
"longitude": 11.753750582859597,
"url": "https://upload.wikimedia.org/wikipedia/commons/thumb/9/9e/Wappen_Oberbayern.svg/200px-Wappen_Oberbayern.svg.png"
}
]
}
}
This feature does not yet exist but will be added in future versions of Vega-Lite/Altair as per this PR https://github.com/vega/vega-lite/pull/7296.

Parsing JSON with multiple arrays and comparing values with Excel data using Python 3.6

I have a JSON like:
{
"results": [{
"data": {
"child": [{
"sex": "2",
"birthDateReliability": "0",
"applicationInternalIdentifier": "cmpclt",
"birthDate": "2016-07-04",
"firstName": "Anna"
}],
"consumerType": "PRIVATE",
"countryCode": "FR",
"initialAppSourceCode": "ABCDWEB",
"optin": [{
"optinSourceApplication": "ABCDWEB",
"acceptanceDate": "2017-02-10T10:14:55.037Z",
"marketingGroupService": "XYZXYX-ABC"
}, {
"optinSourceApplication": "ABCDWEB",
"acceptanceDate": "2017-02-10T10:14:55.037Z",
"marketingGroupService": "XYZXYX-DEF"
}, {
"optinSourceApplication": "ABCDWEB",
"acceptanceDate": "2017-02-10T10:14:55.037Z",
"marketingGroupService": "XYZXYX-GHI"
}, {
"optinSourceApplication": "ABCDWEB",
"acceptanceDate": "2017-02-10T10:14:55.037Z",
"marketingGroupService": "XYZXYX-JKL"
}, {
"optinSourceApplication": "ABCDWEB",
"acceptanceDate": "2017-02-10T10:14:55.037Z",
"marketingGroupService": "XYZXYX-MNO"
}],
"didsys_KGexample": true,
"addressLine1": "123 Street",
"marketCode": "10107"
},
"lastUpdatedTimestamp": 1486721887742,
"socialProviders": "site",
"password": {
"hashSettings": {
"rounds": 9504778,
"salt": "XXXXXXXXX",
"algorithm": "xyz"
},
"hash": "$AF$$$F$$$$$ZX$$$$$J$--"
},
"iRank": 0,
"created": "2017-02-10T10:15:36.814Z",
"lastLoginTimestamp": 1486721736970,
"oldestDataUpdated": "2017-02-10T10:15:36.861Z",
"isLockedOut": false,
"profile": {
"zip": "12345",
"lastName": "Shah",
"email": "abc#gmail.com",
"locale": "en",
"firstName": "Jiten",
"city": "London"
},
"isVerified": false,
"createdTimestamp": 1486721736814,
"identities": [{
"lastName": "Shah",
"zip": "12345",
"isLoginIdentity": true,
"locale": "en",
"lastUpdatedTimestamp": 1486721887742,
"lastUpdated": "2017-02-10T10:18:07.742Z",
"provider": "site",
"allowsLogin": true,
"isExpiredSession": false,
"providerUID": "jbx63a0ed2f9a1cfa8cgh7dsdsl3",
"city": "London",
"oldestDataUpdatedTimestamp": 1486721736861,
"email": "abc#gmail.com",
"oldestDataUpdated": "2017-02-10T10:15:36.861Z",
"firstName": "Jiten"
}],
"lastUpdated": "2017-02-10T10:18:07.742Z",
"emails": {
"unverified": ["abc#gmail.com"],
"verified": []
},
"isRegistered": true,
"regSource": "https://abcn.net/user/register",
"lastLoginLocation": {
"state": "H9",
"coordinates": {
"lon": -0.0930938720703125,
"lat": 51.51420593261719
},
"country": "GB",
"city": "London"
},
"isActive": true,
"lastLogin": "2017-02-10T10:15:36.970Z",
"oldestDataUpdatedTimestamp": 1486721736861,
"UID": "ed9af442a4a7bd63a08a1cfa8c9d02f9",
"registered": "2017-02-10T10:18:07.993Z",
"rbaPolicy": {
"riskPolicyLocked": false
},
"loginIDs": {
"unverifiedEmails": [],
"emails": ["abc#gmail.com"]
},
"registeredTimestamp": 1486721887993,
"loginProvider": "site"
}],
"objectsCount": 1,
"totalCount": 1,
"statusCode": 200,
"errorCode": 0,
"statusReason": "OK",
"callId": "5164e6c985ee4ed9bcd76ebd403cfaaa",
"time": "2017-02-14T14:24:26.487Z"
}
I have maintained the Excel sheet where I have maintained all the above JSON Key/Values in two columns.
Now I want to compare/Validate all the values from Excel Sheet against key/value of above JSON file using Python 3.6.

Categories

Resources