I would like to iterate over the hash on the server side and send it to the client in sorted order using JSON.
My question is:
When I am in my foreach -loop and have a key and complex value (see how my hash looks below), how do I insert it into a JSON string?
This is how i do it
use JSON; my $json = JSON->new; $json = $json->utf8; ...
print Dumper \%act looks like this
$VAR1 = { '127' => { 'owners' => [ 'm' ], 'users' => [ 'hh', 'do' ], 'date_end' => '24/05-2011', 'title' => 'dfg', 'date_begin' => '24/05-2011', 'members_groups' => [], 'type' => 'individuel' }, '276' => { ...
source share