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

1656Re: [json] Helpless beginner

Expand Messages
  • Stephan Beal
    May 19, 2011
    • 0 Attachment
      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

      [Non-text portions of this message have been removed]
    • Show all 8 messages in this topic