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

RE: [json] JSON Prob

Expand Messages
  • Atif Aziz
    Bear in mind that the following... ... [ {firstcell: yyy ,secondcell: xxx }, {firstcell: yyy ,secondcell: xxx }, {firstcell: yyy ,secondcell: xxx } ]
    Message 1 of 4 , Jan 12, 2006
    • 0 Attachment
      Bear in mind that the following...

      [ {firstcell:"yyy",secondcell:"xxx"},
      {firstcell:"yyy",secondcell:"xxx"} ]

      ...is not valid JSON. Technically, it is valid JavaScript, but for you
      to call it JSON data (as per the spec), you mush double-quote the
      property names as well (just like strings). That is, all occurrences of
      firstcell and secondcell must be literally expressed as "firstcell" and
      "secondcell". See also message #187 [1] for more on this.

      [1] http://groups.yahoo.com/group/json/message/187

      -----Original Message-----
      From: json@yahoogroups.com [mailto:json@yahoogroups.com] On Behalf Of
      Sent: Sunday, January 08, 2006 3:37 AM
      To: json@yahoogroups.com
      Subject: [json] JSON Prob

      Hi, i have a json data like

      var celldata = [ {firstcell:"yyy",secondcell:"xxx"},



      By calling celldata.length would return 3 (3 rows), but how do I call
      so that it could determine the number of "columns", which supposed
      return 2 (firstcell and secondcell) ?

      Thanks !

      Yahoo! Groups Links
    Your message has been successfully submitted and would be delivered to recipients shortly.