Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

182
Vistas
Trying to figure out a way to search a JSON file received from ninox API

I'm a junior in college so i'm not fully experienced in coding just yet; However recently I got an internship and I was assigned a task to create a website that connects to the ninox database. So far i've been able to properly connect to the API endpoints and receive the JSON that contains all of the records stored in a specific database. Now i'm trying to work on a function that searches through the JSON file and returns values that match what was in the search box. Looking online for a solution I was able to find functions that use the JQuery RegEx() function but i'm not exactly sure how to implement that,and also i'm trying to store the JSON data into a variable and i'm not sure if its formatted correctly. Heres my current code:

//current fucntion function search(){ //gets value from search bar. not sure if this even needs to be used if regEx is used. let sName = document.getElementById('searchBar').value; var entry; sName = sName.toUpperCase();

//connects to API endpoint
var request2 = new XMLHttpRequest();
var accessToken = 'my token is here';
request2.open('GET','my URL is here');
request2.setRequestHeader('Authorization', 'Bearer ' + accessToken);
//function that stores the JSON reply into a variable
request2.onload = function(){
    // this contains the JSON data
    var data = JSON.parse(this.response)
    if (request2.status >= 200 && request2.status < 400) {
        //this currently just stores JSON data on webpage for testing purposes
        document.getElementById("JSON").innerText += JSON.stringify(data);
    } else {
        alert('error');
    }
}
request2.send();

alert(sName);

}

The JSON it returns is: JSON

I'm trying to search through both the Title and Synopsis Keys for matching strings. Any ideas that would help me achieve this would be greatly appreciated!

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda