Loading ...
Sorry, an error occurred while loading the content.

819Re: Hello all I am new to json so I have a few questions

Expand Messages
  • timgerr
    Jun 27, 2007
      --- In json@yahoogroups.com, "marcrbraincast" <marcrbraincast@...>
      wrote:
      >
      > --- In json@yahoogroups.com, "timgerr" <tim.gallagher@> wrote:
      > >
      > <cut>
      > > >
      > > > The page reads:
      > > >
      > > > Dependencies
      > > > JSONError.js
      > > >
      > > > I guess you need that file included too...
      > > >
      > >
      > >
      > > Thank you for the information, I guess that I need to read
      better.
      > > Here is the biggest question that I have, lets say I have a
      string
      > >
      > > var test = {"outPut":[{"name":"Michelle Gallagher"},{"name":"Bob
      > > Jones"},{"name":"tester"},{"name":"Administrator"}]};
      > >
      > > Can I decode this back into an object?
      > >
      > > Thanks again for the help,
      > > -T
      > >
      >
      > the var test is already an object.
      > It's an object with one array which holds 4 objects.
      >
      > var str = "{'output':['name':'Michelle']}";
      > would make a string...
      >


      I am new to some of this so I might not be clear, I am woking with
      ajax and I am getting a string returned from another webpage that is
      JSON encoded. When I recieve it it is then consittered a string. I
      would like to take this returned string
      {"outPut":[{"name":"Michelle Gallagher"},{"name":"Bob Jones"},
      {"name":"tester"},{"name":"Administrator"}]}
      and put it back into a javascript object. Can I do that with decode?

      Thanks for the help,
      -T
    • Show all 15 messages in this topic