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

626Re: [json] json as js variable

Expand Messages
  • Martin Cooper
    Dec 10, 2006
      On 12/10/06, Mark Ireland <markincuba@...> wrote:
      >
      > Here is one I prepared earlier:
      >
      >
      > {"RECORDCOUNT":30,"COLUMNLIST":"EM,EY,ISSILO,ISWEATHER,LATITUDE,LONGITUDE,PERCENTCOMPLETE,PERCENTQUALITY,SM,UNIQUEID,STATIONNAME,SY,X,Y","DATA":{"EM":[12,5,12,4,10,10,10,10,10,10,10,10,10,10,10,12,10,10,9,12,11,11,12,12,12,10,10,9,3,10],"EY":[2005,2005,2005,2006,2006,2006,2006,2006,2006,2006,2006,2006,2006,2006,2006,2006,2006,.
      > . . . . . .
      >
      > .....,"X":[291,28,152,171,109,96,268,126,250,123,174,188,199,251,91,238,147,274,97,274,126,167,100,145,207,146,120,160,241,232],"Y":[136,188,197,226,212,211,128,113,126,179,197,175,176,148,51,147,252,153,66,180,224,158,83,73,122,131,151,250,178,134]}};
      >
      > I could just loop through this testing for my uniqueID but surely someone
      > has written something quicker and more reusable than that? Is this not a
      > standard structure?


      Depends on how you define "standard", but no, it's not anything I would call
      a standard. I believe it's a format that comes from the CFJSON library, so
      that would be the place to look for helper code to access the data.

      --
      Martin Cooper


      >From: "Martin Cooper" <mfncooper@...>
      > >Reply-To: json@yahoogroups.com
      > >To: json@yahoogroups.com
      > >Subject: Re: [json] json as js variable
      > >Date: Sun, 10 Dec 2006 14:13:22 -0800
      > >
      > >On 12/10/06, Mark Ireland <markincuba@...> wrote:
      > > >
      > > >
      > > > Thanks. I was hoping there was a js function library where you just
      > pass
      > > > the
      > > > unique id and the row is returned.
      > > > Is there one?
      > >
      > >
      > >What do you mean? There is no concept of "row" in JSON, or even unique
      > IDs,
      > >for that matter, beyond the property names in an object. Any structure
      > you
      > >are imposing on your JSON objects is your own, so there isn't going to be
      > a
      > >library out there to manipulate that unless you write it. ;-)
      > >
      > >--
      > >Martin Cooper
      > >
      >
      > _________________________________________________________________
      > Advertisement: Fresh jobs daily. Stop waiting for the newspaper. Search
      > Now!
      > www.seek.com.au
      >
      > http://a.ninemsn.com.au/b.aspx?URL=http%3A%2F%2Fninemsn%2Eseek%2Ecom%2Eau&_t=757263760&_r=Hotmail_EndText_Dec06&_m=EXT
      >
      >
      >
      >
      > Yahoo! Groups Links
      >
      >
      >
      >


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