Skip to content

Instantly share code, notes, and snippets.

@kurianbenoy
Created July 22, 2018 14:04
Show Gist options
  • Select an option

  • Save kurianbenoy/158f0d786e465ccab679657cc18c76be to your computer and use it in GitHub Desktop.

Select an option

Save kurianbenoy/158f0d786e465ccab679657cc18c76be to your computer and use it in GitHub Desktop.
import json
from pprint import pprint
with open('malayalmbible.json') as f:
data = json.load(f)
for item in data["Book"]:
for chapter in item["Chapter"]:
for verse in chapter["Verse"]:
print(verse)
a = json.dumps(verse["Verseid"],sort_keys=True)
print(a)
gen = 65021020
if(a==repr(gen)):
print(verse["Verse"])
@kurianbenoy
Copy link
Author

kurianbenoy commented Jul 22, 2018

JSON File

{"Book":[
{
"Chapter":[
{
"Verse":[
{
"Verseid":"00000000",
"Verse":"ആദിയിൽ ദൈവം ആകാശവും ഭൂമിയും സൃഷ്ടിച്ചു."
},
{
"Verseid":"00000001",
"Verse":"ഭൂമി പാഴായും ശൂന്യമായും ഇരുന്നു; ആഴത്തിന്മീതെ ഇരുൾ ഉണ്ടായിരുന്നു. ദൈവത്തിന്റെ ആത്മാവു വെള്ളത്തിൻ മീതെ പരിവർത്തിച്ചുകൊണ്ടിരുന്നു."
},
{
"Verseid":"00000002",
"Verse":"വെളിച്ചം ഉണ്ടാകട്ടെ എന്നു ദൈവം കല്പിച്ചു; വെളിച്ചം ഉണ്ടായി."
},

@kurianbenoy
Copy link
Author

Current output

{'Verseid': '65021020', 'Verse': 'കർത്താവായ യേശുക്രിസ്തുവിന്റെ കൃപ നിങ്ങളോടെല്ലാവരോടും കൂടെ ഇരിക്കുമാറാകട്ടെ; ആമേൻ.'}
"65021020"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment