in reply to Re^10: (OT) Perl and creating a query for MongoDB
in thread (OT) Perl and creating a query for MongoDB
It's not clear to me how this code
foreach my $k (@{$aref}) { if ($k->{"group"} eq $group) { $k->{"version"} = [ sort uniq $version, @{$k->{"version"}} ]; $key = 0; } } push @{ $aref }, { group => $group, versions => [ $version ] } if ($key);
can create this data structure
{ "group": "pkgs", "values": [ "tcsh" ] },
Is the key 'version', 'versions' or 'values' ?
poj
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^12: (OT) Perl and creating a query for MongoDB
by ovedpo15 (Pilgrim) on Aug 03, 2019 at 11:58 UTC |