in reply to Re^2: Push values into a hash
in thread Push values into a hash

I suspect you want an array, not a hash (push is an array operation) i.e.
my @rows; ... # rest of code push @rows, { ... }; ... my $json = encode_json \@rows;
update: Renamed variable