How to access an array from a json file

@FrancoisIonic, Kindly help me with a sample code of displaying books , chapters and verses in ionic 2

[
{
“abbrev”: “gn”,
“book”: “Genesis”,
“chapters”: [
{
“1”: {
“1”: “In the beginning God created the heaven and the earth.”,
“2”: “And the earth was without form, and void; and darkness {was} upon the face of the deep. And the Spirit of God moved upon the face of the waters.”
}
},
{
“2”: {
“1”: “Thus the heavens and the earth were finished, and all the host of them.”,
“2”: “And on the seventh day God ended his work which he had made; and he rested on the seventh day from all his work which he had made.”
}
},
{
“3”: {
“1”: “Now the serpent was more subtil than any beast of the field which the LORD God had made. And he said unto the woman, Yea, hath God said, Ye shall not eat of every tree of the garden? {Yea…: Heb. Yea, because, etc.}”,
“2”: “And the woman said unto the serpent, We may eat of the fruit of the trees of the garden:”
}
}
]
},
{
“abbrev”: “ex”,
“book”: “Exodus”,
“chapters”: [
{
“1”: {
“1”: “In the beginning God created the heaven and the earth.”,
“2”: “And the earth was without form, and void; and darkness {was} upon the face of the deep. And the Spirit of God moved upon the face of the waters.”
}
},
{
“2”: {
“1”: “Thus the heavens and the earth were finished, and all the host of them.”,
“2”: “And on the seventh day God ended his work which he had made; and he rested on the seventh day from all his work which he had made.”
}
},
{
“3”: {
“1”: “Now the serpent was more subtil than any beast of the field which the LORD God had made. And he said unto the woman, Yea, hath God said, Ye shall not eat of every tree of the garden? {Yea…: Heb. Yea, because, etc.}”,
“2”: “And the woman said unto the serpent, We may eat of the fruit of the trees of the garden:”
}
}
]
},
{
“abbrev”: “lv”,
“book”: “Leviticus”,
“chapters”: [
{
“1”: {
“1”: “In the beginning God created the heaven and the earth.”,
“2”: “And the earth was without form, and void; and darkness {was} upon the face of the deep. And the Spirit of God moved upon the face of the waters.”
}
},
{
“2”: {
“1”: “Thus the heavens and the earth were finished, and all the host of them.”,
“2”: “And on the seventh day God ended his work which he had made; and he rested on the seventh day from all his work which he had made.”
}
},
{
“3”: {
“1”: “Now the serpent was more subtil than any beast of the field which the LORD God had made. And he said unto the woman, Yea, hath God said, Ye shall not eat of every tree of the garden? {Yea…: Heb. Yea, because, etc.}”,
“2”: “And the woman said unto the serpent, We may eat of the fruit of the trees of the garden:”
}
}
]
},
{
“abbrev”: “nu”,
“book”: “Numbers”,
“chapters”: [
{
“1”: {
“1”: “In the beginning God created the heaven and the earth.”,
“2”: “And the earth was without form, and void; and darkness {was} upon the face of the deep. And the Spirit of God moved upon the face of the waters.”
}
},
{
“2”: {
“1”: “Thus the heavens and the earth were finished, and all the host of them.”,
“2”: “And on the seventh day God ended his work which he had made; and he rested on the seventh day from all his work which he had made.”
}
},
{
“3”: {
“1”: “Now the serpent was more subtil than any beast of the field which the LORD God had made. And he said unto the woman, Yea, hath God said, Ye shall not eat of every tree of the garden? {Yea…: Heb. Yea, because, etc.}”,
“2”: “And the woman said unto the serpent, We may eat of the fruit of the trees of the garden:”
}
}
]
}
]

Hi friend, I solve that problem, but the project I have in the office, when I get to the office I will show you how to solve it.

Will be expecting friend.

Thanks

Hello, this is a project page, what I did to show the chapter and the verses of the first book was to create an Array as follows.

import { Component} from '@angular/core';
import { NavController, PopoverController } from 'ionic-angular';
import { Http } from '@angular/http';
import 'rxjs/add/operator/map';
import { ItemDetailsPage } from '../item-details/item-details';
import { PopoversPage} from '../popovers/popovers';

@Component(
{
  selector: 'page-hello-ionic',
  templateUrl: 'Hello-ionic.html'
})

export class HelloIonicPage 
{
    items: Array<{ title: string, abbrev: string }>;
    subItems: Array<{subtitle: string}>;
    chapters: string[];
    //en el erray dentro del constructor, hay que jugar con el ultimo numero ya que este es la longitud de los versiculos.
    constructor(
        public navCtrl: NavController,
        public http: Http,
        public popoverCtrl: PopoverController) 
  {        
     this.http.get('data/rvres.json').map(res => res.json()).subscribe(data => 
    {
         this.items = [];
         for (let i = 1; i < 32; i++) {
             this.items.push({
                 title: data[0].book,
                 abbrev: i + ". " + data[0].chapters[0]['1'][i],
             });
         }
     });
  }
  
     itemSelected(event, item) 
     {
        this.navCtrl.push(ItemDetailsPage, {item: item});
      }
     presentPopover(event)
     {
         let popover = this.popoverCtrl.create(PopoversPage);
         popover.present({ ev: event });
     }
With the following code I get to print this screen

great bro ,

But you put the numbers directly into the for loop ,

How do I do it if i want to let display each chapter and verses of each chapter?
Do you care we do a whatsapp chat so that you can put me through more ? Thanks
(2348095906082)
I really need to fix this bible application urgently.

Hi, contact me via hangouts.

whatsapp +573147177797, I can not find your contact

will beep you now. okay I will also try the google+

+2348095906082

how can i access that array in html file ionic3


__zone_symbol__value
:
Array(4)
0
:
"dfs"
1
:
"fd"
2
:
"sdf"
3
:
"fds"
length
:
4

Thanks for this thread. Am developing Christian hymn apps and i found this thread useful.

Tried this but I got an error saying that “Cannot read property “book” of undefined”. We’re using the same json file so I wonder why. Help me please.