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

1657Re: Helpless beginner

Expand Messages
  • jonerlandmadsen
    May 19, 2011
    • 0 Attachment
      --- In json@yahoogroups.com, Stephan Beal <sgbeal@...> wrote:
      >
      > On Thu, May 19, 2011 at 3:47 PM, jonerlandmadsen <
      > jon.erland.madsen@...> wrote:
      >
      > > According to Wikipedia, I can make an object out of it, using "eval". The
      > > example given is:
      > >
      > > var p = eval("(" + contact + ")");
      > >
      > > ..where 'contact' is the json array contained in a text object.
      > >
      > > But there must be a step between, that is not explained.
      > >
      >
      > Nope. JSON is a subset of JavaScript and eval() runs the JavaScript which is
      > passed to it. The extra parenthesis are a workaround (for what, exactly, i
      > don't remember).
      >
      >
      > > The
      > > aforementioned external json array has no name. It just starts with a
      > > paranthesis [
      > >
      >
      > After the above line runs, it has the name 'p' (the name you gave it).
      >
      > --
      > ----- stephan beal
      > http://wanderinghorse.net/home/stephan/
      >
      >
      > [Non-text portions of this message have been removed]
      >

      Thank you for your kind answer, but it does not address my problem: How to get the external json array into a text string (that can then be parsed).
    • Show all 8 messages in this topic