Welcome Guest, Not a member yet? Register   Sign In
Datamapper to_json question
#6

[eluser]seth.aldridge[/eluser]
Looking at the code, it seems all I'd need to do is remove the specific call to just the ID.

Code:
foreach($object->{$f} as $item)
{
$rels[] = $item->id;
}
$result[$f] = $rels;

To something like

Code:
foreach($object->{$f} as $item)
{
$rels[] = $item;
}
$result[$f] = $rels;


Messages In This Thread
Datamapper to_json question - by El Forum - 01-17-2012, 03:16 PM
Datamapper to_json question - by El Forum - 05-14-2012, 07:29 PM
Datamapper to_json question - by El Forum - 05-15-2012, 02:52 AM
Datamapper to_json question - by El Forum - 05-15-2012, 08:20 AM
Datamapper to_json question - by El Forum - 05-15-2012, 09:26 AM
Datamapper to_json question - by El Forum - 05-15-2012, 10:22 AM
Datamapper to_json question - by El Forum - 05-15-2012, 10:53 AM
Datamapper to_json question - by El Forum - 05-15-2012, 11:45 AM
Datamapper to_json question - by El Forum - 05-15-2012, 02:24 PM
Datamapper to_json question - by El Forum - 05-15-2012, 02:26 PM
Datamapper to_json question - by El Forum - 05-15-2012, 02:44 PM
Datamapper to_json question - by El Forum - 05-15-2012, 05:12 PM
Datamapper to_json question - by El Forum - 05-15-2012, 05:34 PM
Datamapper to_json question - by El Forum - 05-15-2012, 05:43 PM
Datamapper to_json question - by El Forum - 05-16-2012, 05:43 AM



Theme © iAndrew 2016 - Forum software by © MyBB