how to interpret code igniter record results with JSON - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: how to interpret code igniter record results with JSON (/showthread.php?tid=42270) |
how to interpret code igniter record results with JSON - El Forum - 06-01-2011 [eluser]heaversm[/eluser] Hi - I currently have a form setup that, depending on the user's dropdown selection, finds a specific table row, and returns that data back to a view as a JSON object. But how do I access that JSON Object's properties (columns of the table row)? Here's my code: VIEW: Code: [removed] CONTROLLER: Code: function get_tree($tree){ MODEL: Code: function get_tree_by_id($tree = null){ how to interpret code igniter record results with JSON - El Forum - 06-01-2011 [eluser]toopay[/eluser] In the first place, you should returning an array instead an object. In your model Code: //... |