var app = new Vue({ el: "#app", data: { searchKey: '', select: {}, data: [], }, computed: { list: function () { var reg = new RegExp(this.searchKey, 'ig'); if (this.searchKey) { return this.data.filter(function (item) { return item.title.match(reg); }); } return this.data; } }, methods: { onSelect: function (item) { this.select = item; } }, mounted: function () { $.ajax({ url: "data.json", method: "get", dataType: "json", success: function (response) { console.log(response) this.data = response.result; }.bind(this) }) } });