the main problem I have when reading the books of the bible is that I do not understand very well how to organize json files:
[{
"abbrev": "gn",
"book": "Genesis",
"chapters": [{
"1": {
"1": "At the first God made the heaven and the earth.",
"2": "And the earth was waste and without form; and it was dark on the face of the deep: and the Spirit of God was moving on the face of the waters.",
"3": "And God said, Let there be light: and there was light.",
"4": "And God, looking on the light, saw that it was good: and God made a division between the light and the dark,",
"5": "Naming the light, Day, and the dark, Night. And there was evening and there was morning, the first day.",
"6": "And God said, Let there be a solid arch stretching over the waters, parting the waters from the waters.",
"7": "And God made the arch for a division between the waters which were under the arch and those which were over it: and it was so."
}
}]
}]
I have already modified my hello files.
import { Component } from '@angular/core';
import { NavController } from 'ionic-angular';
import { Http } from '@angular/http';
import 'rxjs/add/operator/map';
@Component(
{
selector: 'page-hello-ionic',
templateUrl: 'Hello-ionic.html'
}
)
export class HelloIonicPage
{
constructor(public navCtrl: NavController, public http: Http)
{
this.http.get('data/gif.json')
.map(res =>{
return res.json().categories.reduce((pre, cur) => {
let prevResult = Number.isInteger(pre) ? pre : pre.recipes.length
return Math.max(prevResult, cur.recipes.length);
})
})
.subscribe(data => {
console.log(data);
});
}
}
The problem is that I can not find how to print on my page the book of genesis of the json file that I showed you above,
<ion-header>
<ion-navbar>
<button ion-button menuToggle>
<ion-icon name="menu"></ion-icon>
</button>
<ion-title>BIBLIA RV</ion-title>
</ion-navbar>
</ion-header>
<ion-content>
</ion-content>
I have seen hundreds of tutorials but I have failed at all, if you have time available and would like to help me in this development, I would thank you infinitely.