Skip to content
Advertisement

Tag: json

How to parse link header from github API

the github API sends the pagination data for the json results in the http link header: since the github API is not the only API using this method (i think) i wanted to ask if someone has a useful little snippet to parse the link header (and convert it to an array for example) so that i can use it

JS search in object values

I have an array of homogeneous objects like so; I’d like to search these objects’ values (not keys) with a keyword, and return an array of objects that contain the keyword in any of the values. So for example, with a keyword r, I would get all the objects (“baR” in object #1, “loRem” in object #2 and “doloR” in

trouble with recursion; parsing JSON

I have a json object like this: …and I’m trying to iterate through it and get a total count on the “text” objects. I can’t seem to be able to get something recursive working.. I think I’m missing a base-level understanding of both json and recursion.. After a couple of days of variations on this: I’ve come to the conclusion

How to extract url data from Reddit API using JSON

I’m trying to extract the image post URLs from a subreddit feed, and render <img> elements on my page. Been trying to hack together the .getJSON() Flickr example from the jQuery Docs for a while now and I’m not getting anywhere. Code in question: In the body, I have the element: div#images I understand that I need to use JSONP,

Sending Javascript Object to PHP via Ajax

I’m learning Ajax by failure and have hit a wall: I have an array (if it matters, the array is storing number id’s based on what checkboxes the user checks) that is written in Javascript. I have a function that is called when the user clicks the ‘save’ button. The function is as follows: My question is: What can I

Json file gives 403 error on server

I have a json file contianing data which I access through javascript. On my virtual MAMP server on mac It works, but on my online server when I load the HTML file I cant access the json file from javascript. I get 403 no permission for access error. Why? Answer If your production server is Linux based then please consider

How to convert variables into json?

I want to send json data to ajax but how do you convert variables into json or convert an array to json? Answer If you really want to convert the data into JSON, you have to create an object or array and use JSON.stringify (available in newer browser and can be loaded form here): but you cannot just set the

Convert json data to a html table [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers. Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it. Closed 8 years

Advertisement