Of course it is possible. Suppose this is your json file

And here is your code to call json
import { Injectable } from '@angular/core'; import { Http, Headers, Response } from '@angular/http'; import { Observable } from 'rxjs'; import 'rxjs/add/operator/map' @Injectable() export class YourService { constructor(private http: Http) { } getAdvantageData(){ let apiUrl = './assets/data/api/advantage.json'; return this.http.get(apiUrl) .map( (response: Response) => { const data = response.json(); return data; }); } }
Vivek shukla
source share