Parsing cfWheels JSON with query - simple POC testing

56 views
Skip to first unread message

jeffbourassa

unread,
Nov 12, 2013, 12:39:43 AM11/12/13
to cfwh...@googlegroups.com
Hi All

I am doing some POC work with a project that requires JSON feeds.  I am using cfWheels to create the JSON with out of the box formatting.

I am looking for jquery help with parsing the cfwheels generated json data - sample json file below.  I am fairly new to jQuery, for this sort of stuff, so any help would be greatly appreciated.


{"COLUMNS":["IDN","FIRSTNAME","LASTNAME"],"DATA":[[1,"john","matsuda"],[2,"Jenna","Greenizan"],[3,"Chris","Greenizan"],[4,"Amanda","Wantke"],[5,"Shawn","Graham"],[7,"Brooke","Stevens"],[8,"Shawn","Harks"],[9,"Dean","Wantke"],[10,"Will","Beatty"],[11,"Lisa","Mckillican"],[12,"Dee (Denise)","Hill"],[13,"Kelli","McAninch"],[14,"Kelli","McAninch"]]} 


Here is where I am at thus far - I can get the json file, and dump it to the console.  I would now like to iterate through the file and dump into a simple table.

<script>
$(function() {
$.ajax({ 
            url: "http://lmspdev.langleyslopitch.ca/spareplayers/index?format=json",
            dataType: "json", 
            success: function(response) { 
            console.log(response);
            } 
        });})(jQuery);
</script> 


Thanks 

 

Chris Peters

unread,
Nov 12, 2013, 9:13:09 AM11/12/13
to cfwh...@googlegroups.com
You'll probably want to look at this post from Ben Nadel:
http://www.bennadel.com/blog/1755-Looping-Over-ColdFusion-JSON-Queries-In-jQuery.htm


--
You received this message because you are subscribed to the Google Groups "ColdFusion on Wheels" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cfwheels+u...@googlegroups.com.
To post to this group, send email to cfwh...@googlegroups.com.
Visit this group at http://groups.google.com/group/cfwheels.
For more options, visit https://groups.google.com/groups/opt_out.

Reply all
Reply to author
Forward
0 new messages