Help

Filter search using API and Vue.js

1162 0
cancel
Showing results for 
Search instead for 
Did you mean: 
Andreas_Iacovid
6 - Interface Innovator
6 - Interface Innovator

Hi,

i have this code in Vue.js in an HTML document. It displays all records from a table in airtable. i want to modify it so as to choose which record to show (i.e use the ffilterbyformula) for example filter by email.

please find attached my code.

My Pilot Book

  • {{ item['fields']['email'] }}

                    <p><strong>Registration No.1: </strong>${{ item['fields']['Registration No.1'] }}</p>
                    <p><strong>Registration No.2: </strong>${{ item['fields']['Registration No.2'] }}</p>
              
                </li>
            </ul>            
        </div><!--app-->
    
    var app = new Vue({ el: '#app', data: { items: [] }, mounted: function(){ this.loadItems(); }, methods: { loadItems: function(){ // Init variables var self = this var app_id ="--------------------------------"; var app_key = "--------------------------------"; this.items = [] axios.get( "https://api.airtable.com/v0/"+app_id+"/test?view=Grid%20view", { headers: { Authorization: "Bearer "+app_key } , } ).then(function(response){ self.items = response.data.records }).catch(function(error){ console.log(error) }) } } })
0 Replies 0