The function supposed to change a text value in a text using a 3rd service API for flights.
The problem is… nothing happanss and it seem like the json not working…
Anyone knows why?
My final goal is to put the results in texts in another page but I try to test it first to my page.
export function searchButton_click(event, $w) {
fetch(‘https://api.skypicker.com/flights?v=3&sort=price&locale=en&partner=picky&flyFrom=IST&to=AYT&dateFrom=03/02/2018&dateTo=03/02/2018&typeFlight=oneway&adults=1&curr=EUR’, {method: ‘get’})
.then(response => response.json())
.then(json => $w(“#text21”).text = json.search_results_json.data[0].mapIdFrom.toString());
The website: www.flilu.com