I want to extract usernames from a JSON data file.
[{"username": "Cobra", "user_id": 146231486, "event_type": 2,
"title": null, "class_id": 4211, "war_state" : null,
"superpower_expire_date": 1441178060.0, "role": 3, "event_state": 2,
"avatar_id": 4211, "avatar_type" : 2, "recent_gifts": []},
{"username": "Divineshadow", "user_id": 1622533959, "event_type": 2,
"title" : null, "class_id": 1887, "war_state": null,
"superpower_expire_date": null, "role": 2, "event_state" : 2,
"avatar_id": 1887, "avatar_type": 2, "recent_gifts": []}, {"username":
"-TheLastTrojan_", "user_id" : 1387569472, "event_type": 2, "title":
null, "class_id": 1887, "war_state": null, "superpower_expire_date" :
1440106625.0, "role": 1, "event_state": 3, "avatar_id": 1887,
"avatar_type": 2, "recent_gifts": [] }, {"username": "-TheLostHero-",
"user_id": 246900216, "event_type": 2, "title": null, "class_id": 1887,
"war_state": null, "superpower_expire_date": null, "role": 3,
"event_state": 2, "avatar_id": 1887, "avatar_type": 2,
"recent_gifts": []}, {"username": "_The-Divineshadows-Minion_",
"user_id": 347494612 , "event_type": 2, "title": null, "class_id":
3382, "war_state": null, "superpower_expire_date": null , "role": 3,
"event_state": 2, "avatar_id": 3382, "avatar_type": 2, "recent_gifts": []}]
I want to pick all the usernames in the order in which they appear in the JSON data file and compile it in a column of Excel sheet or text file. The output file should look like this:
- Cobra
- Divineshadow
- -TheLostHero-
- _The-Divineshadows-Minion_
Any help with how I can manage to do achieve my desired output file?
