Searchbar with filter and from JSON data with Ionic 2
I'm very new to Typescript and Ionic 2 and I'm trying to filter trough a json response with Ionic 2 search bar. This is my code: import {Component} from '@angular/core'; import {NavController} from 'ionic-angular'; import {Http} from '@angular/http'; import 'rxjs/add/operator/map'; @Component({ templateUrl: 'build/pages/home/home.html' }) export class HomePage { posts: any; private searchQuery: string = ''; private items: string[]; constructor(private http: Http) { this.initializeItems(); this.http.get('https://domain.co/open.jsonp').map(res => res.json()).subscribe(data => { this.posts = data