Skip to content
Advertisement

Tag: json

JSON empty when is called from another file

I’m learning NodeJS and MongoDB. I dont know what is happening with this function. If I make a console.log before return user, it works fine (just print an JSON array with all info of the collection) The problem is when I call it from another file (in my case, the router). If I do this, I receive an empty json.

Getting JSON object from a arraylist

I have specific problem with axios to getting JSON object from my arraylist, so instead of display my displayName on my nav bar, it display all response headers information, i don’t know why ? : that my json list from my localhost : that my code : Answer Take a look at the axios docs. The response object contains much

Javascript argparse with JSON config

I’m trying to integrate argparse into my Javascript program, such that all arguments can be loaded from an external config file, and then those values can be overridden with provided CLI arguments afterwards. To do this, I decided to read a config file & parse it into a JSON object, then iterate through the keys and set the default values

Unable to retrieve specific elements from JSON api

Implement a function fetchDataForUser, which fetches data from a remote JSON api and then returns a part of it. Since this is a network call, it will need to be an asynchronous function and return the data via a callback. JSON Data: https://gist.githubusercontent.com/kvirani/f7d65576cc1331da1c98d5cad4f82a69/raw/4baad7566f0b6cd6f651c5d3558a015e226428b5/data.json The callback should be called with two arguments: error: if request comes back with an err, pass

Get the id of an object in a json request? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 9 months ago. Improve this question So I have to get the first object of this list: } I don’t know beforehand the IDs [‘2489’] and

Advertisement