JSFiddle - React, Tailwind, and code Playground

by Luis Martin

JavaScript

var data = {
      "action": "json",
      "apikey": "0lVOkSbmEM5iIo7pAPFprxFUUuJUCZXU",
      "country": "es",
      "maxItems": 50,
      "numPage": 1,
      "distance": 1000,
      "center": "40.429,-3.697",
      "noSmokers": true,
      "sex": "X",
      "operation": "A",
      "pictures": true,
      "propertyType": "bedrooms",
      "k": "4ebe5ef1c9ba6f28c15cc26d755016b9",
      "t": "apigee"
    };
    // Se ha utilizado el "resource-proxy" de Esri  para evitar el problema
    // de CORS: https://github.com/esri/resource-proxy
    var endpoint = "https://www.idealista.com/labs/api/2/search?";
    $.getJSON(endpoint, data, function(response){
      console.log(response);
      
      var wantedData = response.elemtList.filter(function(i) {
  return i.agency === true;
});
console.log(wantedData);
    });