How to render a jQuery AJAX JSON object from PHP to KnockoutJS

lar

New Member
Wondering if anyone can do a quick demo on Jsfiddle to show how it would work to do the following.Let's say I have a mysql table with columns: product_name, product_price, product_id;I do a mysql select and return the array using an AJAX call. How do I render that on page using Knockout? I can do the AJAX call and grab the data. It's returned as an object. I use json_encode in the PHP to return the data back in getJSON call.What do I do next to render it? That's what I am stuck on. I just want to render a table looping product name, product id, and price.\[code\] var allData = http://stackoverflow.com/questions/10542690/$.getJSON("ajax.php?request=getresults", data, function(response) { return (response); })\[/code\]Thanks!
 
Back
Top