Skip to content
Advertisement

Tag: api

Missing data in JSON from API call, gives error

I make an API call to server to fetch data Then I turn the JSON into GeoJSON for Leaflet.js The problem is that every items does not have the values of “openingHours”. This makes the error “undefined” and I can’t retrieve data to display on Leaflet map. How can I go pass or ignore those values or perhaps filter them

Do I need a Goodreads API key to retrieve book metadata?

I am trying to build an app around books. Goodreads has a great catalogue on books. But they stopped providing new API keys since December 2020. My question is how can I retrieve just book metadata from Goodreads? I don’t want any data associated with a user(in that case, requiring an API key is fair). My only requirement is just

Problem with dynamic request header in axios template

In my react app, I created an api.js file which creates an api object with axios.create and exports it as default. So, I use that template to make the API requests. The problem is that, one of the headers in created axios api object must be dynamic. For example, see the locale header below: At first it may be something

Javascript – Google map not displaying

I am trying to create a page that shows google map and allows users to draw lines on the map and save them.. but when I try to run the page, the map doesn’t show up at all. What am I doing wrong? the page is literally blank with the form at the end. I was having a look online

React Native UseEffect API CALLS

How to handle multiple api calls in the same render ? Example : I want to get some info from first API call like this for example : and i want to instantly use it for the next API CALL coming under this call example : Soo the question is how to use information that i get inside first API

How can I get the last object in this JSON array?

I’m trying to use player data from a football stats API, but I can’t seem to get data for the current season (which can be found in the last object in the array). For some reason I’m only getting data for the third index (code below). Here is an image of the JSON data I am trying to access. In

tried a lot but not able to make deletehandler function working. here is my code

This is my librarylist component in which i pass deletehandler function to delete the row from library management. I don’t know which part of the code is causing the problem. Any helps/suggestions are welcome. LibraryBookList.js here i pass deletehandler via props LibraryBook.js **BookData.js ** NewDataBase.js Answer The code has a few issues: 1) props.onSelect(props.id) inside onClick. Instead you should give

How to pass variable in URL React js

in react js I made a simple date picker and select date from the dropdown calendar and I displayed it in the console. that date stored in a variable, now how to use that variable in URL My questions : How to pass parameter in React js URL how to print parameter in console log code: A date is from

Advertisement