Help me urgent! How to get json array?

#1

Hi All

i Have problem with get data json array… this my code app.module.ts

import {HttpClientModule} from '@angular/common/http';

@NgModule({
  declarations: [AppComponent],
  entryComponents: [],
  imports: [
    BrowserModule,
    IonicModule.forRoot(),
    AppRoutingModule,
    HttpClientModule
  ],

and home.page.ts

import { Component } from '@angular/core';
import {Http, Headers } from '@angular/http';
import 'rxjs/add/operator/map';

@Component({
  selector: 'app-home',
  templateUrl: 'home.page.html',
  styleUrls: ['home.page.scss'],
})

export class HomePage {

 
constructor(public http:Http) {

}
}
users:any
load()
{
  this.http.get('http://www.mywebsite.json').subscribe(data => {
  console.log(data);
  }) ; 
}
}

but i can’t get data json …

#2

load method should be inside “export class HomePage{ }”