I think your problem is that you don't have a firm grasp of javascript
objects or object notation in general.
JSON is just a method of transfering javascript objects in a text
format. jQuery automatically converts the JSON string into a
javascript object if you tell it to (Look at the
well wot I'm doing is an ajax call to retrieve my json data .
then i want to parse it show all the records in the #postContent.
but wot is harder here is the fact that in my jason file there are
three objects at the same time returned by the query.
Posts/Category/Comment
The
its returning me an OBJECT OBJECT
i have four levels down ...is there something wrong due to my firewall or
anything. ..its not able to access the url or something???
On Thu, Jul 23, 2009 at 5:03 AM, MorningZ morni...@gmail.com wrote:
$.getJSON(
url_of_json_request,
function(json) {
as it should !
and that isn't the string/data that you are returning, as you are
probably doing an alert to see your data... which is not going to
work as the $.getJSON automatically turns your string value into an
Object
this stripped down simple example shows the same thing
htmlbody
script
Here's a working version to demonstrate (click on the Output tab to
see it run):
http://jsbin.com/emeta/edit
just think of the variable x coming from a $.getJSON call
What exactly do you want to do? How is the JSON content stored? In a
separate file? On the document?
Is it introduced through jQuery's getJSON()? Is it stored as a string
in some variable?
On Jul 22, 5:17 am, Abraham Boray abrahambo...@gmail.com wrote:
As U can see guys , I got that json
I want to parse it with jquery , I searched in the web but it's seems
my json file is a bite complicated
What is that supposed to mean? *what do you want to accomplish?* i
want to parse doesn't really mean anything
and other than there are a lot of characters, there's nothing overly
even am having issue with a simple GET request using the GETJSON
method...could anyone please provide me with the sample code ?
On Thu, Jul 23, 2009 at 4:58 AM, MorningZ morni...@gmail.com wrote:
I want to parse it with jquery , I searched in the web but it's seems
my json file is a bite
$.getJSON(
url_of_json_request,
function(json) {
$.each(json, function(i) {
json[i] // current top level index
})
}
)
On Jul 22, 7:30 pm, Ajay Sharma sharmaa...@gmail.com wrote:
even am having issue with a simple GET request using the GETJSON
9 matches
Mail list logo