Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

191
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!