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

<html><body>
<script type="text/javascript">
var x = { a: 1, b: 2 }; //<- Json object
alert(x); //will show [object Object]
</script>
</body></html>

I think your issue is with this statement from a few posts ago

"even am having issue with a simple GET request using the GETJSON
method"

the getJSON is not a simple GET request, it's a GET request that *in
addition to* getting the ajax call's value, it also transforms it from
a string to an object



On Jul 23, 5:30 am, Ajay Sharma <sharmaa...@gmail.com> wrote:
> 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) {
> >        $.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
> > > 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 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
> > > > complicated about it
>
> > > > the $.each method will walk key/value pairs and the array members of
> > > > the object (and that's all that is, an object, there's nothing more
> > > > complex than that)
>
> > > > On Jul 22, 6:18 pm, James <james.gp....@gmail.com> wrote:
> > > > > 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 structure , & I want to parse
> > it
> > > > > > with jquery , I searched in the web but it's seems my json file is
> > a
> > > > > > bite complicated :S
>
> > > > > > here is the picture more clear thatn the file down !
> > > >http://www.zshare.net/image/63013802b34a7372/
>
> > > > > > Here is my plane JSON file
> > > > > > [{"Post":{"id":"1","category_id":"1","title":"CSS
> > > > > > Mastering","date":"2009-07-21 22:40:00","content":"How 2 CSS Master
> > in
> > > > > > 5 Days :D ,This association creation and destruction is done using
> > the
> > > > > > CakePHP model bindModel() and unbindModel() methods. (There is also
> > a
> > > > > > very helpful behavior called \"Containable\", please refer to
> > manual
> > > > > > section about Built-in behaviors for more information). Let's set
> > up a
> > > > > > few models so we can see how bindModel() and unbindModel() work.
> > We'll
> > > > > > start with two models: This association creation and destruction is
> > > > > > done using the CakePHP model bindModel() and unbindModel() methods.
> > > > > > (There is also a very helpful behavior called \"Containable\",
> > please
> > > > > > refer to manual section about Built-in behaviors for more
> > > > > > information). Let's set up a few models so we can see how
> > bindModel()
> > > > > > and unbindModel() work. We'll start with two models: This
> > association
> > > > > > creation and destruction is done using the CakePHP model
> > bindModel()
> > > > > > and unbindModel() methods. (There is also a very helpful behavior
> > > > > > called \"Containable\", please refer to manual section about
> > Built-in
> > > > > > behaviors for more information). Let's set up a few models so we
> > can
> > > > > > see how bindModel() and unbindModel() work. We'll start with two
> > > > > > models: ","visible":"1"},"Category":{"id":"1","name":"CSS","Post":
> > > > > > [{"id":"1","category_id":"1","title":"CSS
> > > > > > Mastering","date":"2009-07-21 22:40:00","content":"How 2 CSS Master
> > in
> > > > > > 5 Days :D ,This association creation and destruction is done using
> > the
> > > > > > CakePHP model bindModel() and unbindModel() methods. (There is also
> > a
> > > > > > very helpful behavior called \"Containable\", please refer to
> > manual
> > > > > > section about Built-in behaviors for more information). Let's set
> > up a
> > > > > > few models so we can see how bindModel() and unbindModel() work.
> > We'll
> > > > > > start with two models: This association creation and destruction is
> > > > > > done using the CakePHP model bindModel() and unbindModel() methods.
> > > > > > (There is also a very helpful behavior called \"Containable\",
> > please
> > > > > > refer to manual section about Built-in behaviors for more
> > > > > > information). Let's set up a few models so we can see how
> > bindModel()
> > > > > > and unbindModel() work. We'll start with two models: This
> > association
> > > > > > creation and destruction is done using the CakePHP model
> > bindModel()
> > > > > > and unbindModel() methods. (There is also a very helpful behavior
> > > > > > called \"Containable\", please refer to manual section about
> > Built-in
> > > > > > behaviors for more information). Let's set up a few models so we
> > can
> > > > > > see how bindModel() and unbindModel() work. We'll start with two
> > > > > > models:
> > ","visible":"1","Category":{"id":"1","name":"CSS"},"Comment":
> > > > > > [{"id":"2","post_id":"1","date":"2009-07-22
> > 14:10:00","content":"Nice
> > > > > > TUTO ,Keep it up Dude!","userName":"Reda","a_url":"http:\/\/
> > > > > > k...@hani.bikhir","e_mail":"ma...@gmailika.hy","showMail":"1"},
> > > > > > {"id":"6","post_id":"1","date":"2009-07-22
> > 14:38:00","content":"Nice
> > > > > > TUTO ,Keep it up Dude!","userName":"reda","a_url":"http:\/\/
> > > > > > url.com","e_mail":"m...@mail.fr","showMail":"1"}]},
> > > > > > {"id":"2","category_id":"1","title":"Beginning
> > CSS","date":"2009-07-21
> > > > > > 22:41:00","content":"Courses 4 Dummies . Beginning
> > > > > > CSS","visible":"1","Category":{"id":"1","name":"CSS"},"Comment":
> > > > > > [{"id":"3","post_id":"2","date":"2009-07-22
> > 14:16:00","content":"Nice
> > > > > > CSS tut ;)","userName":"Talal","a_url":"http:\/\/
> > > > > > rwina.talal.com","e_mail":"mail...@gtol.de
> > > > ","showMail":"1"}]}]},"Comment":
> > > > > > [{"id":"2","post_id":"1","date":"2009-07-22
> > 14:10:00","content":"Nice
> > > > > > TUTO ,Keep it up Dude!","userName":"Reda","a_url":"http:\/\/
> > > > > > k...@hani.bikhir","e_mail":"ma...@gmailika.hy
> > ","showMail":"1","Post":
> > > > > > {"id":"1","category_id":"1","title":"CSS
> > Mastering","date":"2009-07-21
> > > > > > 22:40:00","content":"How 2 CSS Master in 5 Days :D ,This
> > association
> > > > > > creation and destruction is done using the CakePHP model
> > bindModel()
> > > > > > and unbindModel() methods. (There is also a very helpful behavior
> > > > > > called \"Containable\", please refer to manual section about
> > Built-in
> > > > > > behaviors for more information). Let's set up a few models so we
> > can
> > > > > > see how bindModel() and unbindModel() work. We'll start with two
> > > > > > models: This association creation and destruction is done using the
> > > > > > CakePHP model bindModel() and unbindModel() methods. (There is also
> > a
> > > > > > very helpful behavior called \"Containable\", please refer to
> > manual
> > > > > > section about Built-in behaviors for more information). Let's set
> > up a
> > > > > > few models so we can see how bindModel() and unbindModel() work.
> > We'll
> > > > > > start with two models: This association creation and destruction is
> > > > > > done using the CakePHP model bindModel() and unbindModel() methods.
> > > > > > (There is also a very helpful behavior called \"Containable\",
> > please
> > > > > > refer to manual section about Built-in behaviors for more
> > > > > > information). Let's set up a few models so we can see how
> > bindModel()
> > > > > > and unbindModel() work. We'll start with two models:
> > > > > > ","visible":"1","Category":{"id":"1","name":"CSS"},"Comment":
> > > > > > [{"id":"2","post_id":"1","date":"2009-07-22
> > 14:10:00","content":"Nice
> > > > > > TUTO ,Keep it up Dude!","userName":"Reda","a_url":"http:\/\/
> > > > > > k...@hani.bikhir","e_mail":"ma...@gmailika.hy","showMail":"1"},
> > > > > > {"id":"6","post_id":"1","date":"2009-07-22
> > 14:38:00","content":"Nice
> > > > > > TUTO ,Keep it up Dude!","userName":"reda","a_url":"http:\/\/
> > > > > > url.com","e_mail":"m...@mail.fr","showMail":"1"}]}},
> > > > > > {"id":"6","post_id":"1","date":"2009-07-22
> > 14:38:00","content":"Nice
> > > > > > TUTO ,Keep it up Dude!","userName":"reda","a_url":"http:\/\/
> > > > > > url.com","e_mail":"m...@mail.fr","showMail":"1","Post":
> > > > > > {"id":"1","category_id":"1","title":"CSS
> > Mastering","date":"2009-07-21
> > > > > > 22:40:00","content":"How 2 CSS Master in 5 Days :D ,This
> > association
> > > > > > creation and destruction is done using the CakePHP model
> > bindModel()
> > > > > > and unbindModel() methods. (There is also a very helpful behavior
> > > > > > called \"Containable\", please refer to manual section about
> > Built-in
> > > > > > behaviors for more information). Let's set up a few models so we
> > can
> > > > > > see how bindModel() and unbindModel() work. We'll start with two
> > > > > > models: This association creation and destruction is done using the
> > > > > > CakePHP model bindModel() and unbindModel() methods. (There is also
> > a
> > > > > > very helpful behavior called \"Containable\", please refer to
> > manual
> > > > > > section about Built-in behaviors for more information). Let's set
> > up a
> > > > > > few models so we can see how bindModel() and unbindModel() work.
> > We'll
> > > > > > start with two models: This association creation and destruction is
> > > > > > done using the CakePHP model bindModel() and unbindModel() methods.
> > > > > > (There is also a very helpful behavior called \"Containable\",
> > please
> > > > > > refer to manual section about Built-in behaviors for more
> > > > > > information). Let's set up a few models so we can see how
> > bindModel()
> > > > > > and unbindModel() work. We'll start with two models:
> > > > > > ","visible":"1","Category":{"id":"1","name":"CSS"},"Comment":
> > > > > > [{"id":"2","post_id":"1","date":"2009-07-22
> > 14:10:00","content":"Nice
> > > > > > TUTO ,Keep it up Dude!","userName":"Reda","a_url":"http:\/\/
> > > > > > k...@hani.bikhir","e_mail":"ma...@gmailika.hy","showMail":"1"},
> > > > > > {"id":"6","post_id":"1","date":"2009-07-22
>
> ...
>
> read more »

Reply via email to