+ Reply to Thread
Results 1 to 3 of 3

Thread: parsing results from a web service with dekiscript

  1. #1

    Default parsing results from a web service with dekiscript

    Hello,

    I'm trying to pull data into a deki wiki from the sunlight api web service. The results of the webserive are returned in name value pairs using the following format:

    { "entity_id" : "fakeopenID438", "CRPcandID" : "N00009082", "URL" : "http://allard.senate.gov"}

    ie

    {"name1" : "value1", "name2" : "value2", "name3" : "value3"}

    Is there any easy way to parse out the value of a specific named entry via dekiscript?

    Thanks,
    Ilan
    Last edited by irabinovitch; 03-26-2008 at 04:28 PM. Reason: correcting spelling mistakes

  2. #2
    Join Date
    Jul 2006
    Location
    San Diego, CA
    Posts
    5,450

    Default

    1.9.1 (out in ~10 days), you'll be able to do this:
    string.deserialized(web.text("uri from where the date came from"))

    Note: this only happens to work because DekiScript and JavaScript are close relatives!
    Steve G. Bjorg - Chief Architect
    Did you check the MindTouch FAQ?
    Found a bug? Report it.
    Follow me on Twitter
    Find us on IRC: irc.freenode.net #mindtouch

  3. #3

    Default

    Awesome. I was looking at that function in the documetnation and hoping it would help.

+ Reply to Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts