Skip to content

Tag: api

Pulling and displaying API data to tailwind cards

could someone help on how to get all data from this console log? I am trying to display all the details in individual tailwind cards but not sure how to get the data. Thank you for your time. It works and I get the results below in console. when I tried console.log (response.data.0.pdf) for example, it gives …

Replace fetch link with html button

This code is designed to take a data from API, convert it to JSON and display it in the HTML page (with a specific design). There are two buttons on the HTML page that are for changing the page (to change the page, the URL sent to fetch needs to be changed by clicking the buttons (which is where my

Read response from HttpRequest in JavaScript

First, you can ignore that this is sending credentials in an unsafe manner. I’m supposed to handle that after. My problem is with reading the ‘response’ or ‘responseText’ from a HttpRequest to an API. I can see in the console the request is succesful and the response I want is th…

Shuffling in react

I am fetching data from an api.Trying to make quiz application from the data of an API.I have selected random countries and their respective capitals and map them to my quiz application.I have achieved this already.Now i am trying to shuffle my answer options but not able to do that.anybody can please help? H…

Trying to sort an API set by date range

Good day everyone, I’ve fetched this set of data from new york city’s open data API portal and am trying to sort all entries by endpoint inspection_date within the past two years. I’d also like to sort the results by the latest times first. However, I’m having trouble getting my endpoi…