I guess this is also not quite what you wanted...
my @all = JSON::Path->new( '$..author[*].[family,given,affiliation]' )
+->values( $data );
print Dumper \@all;
__END__
$VAR1 = [
'Oubaha',
'Brahim',
[
{
'name' => 'Laboratory of Biology and Biotechnology of Mi
+croorganisms Faculty of Sciences Semlalia Cadi Ayyad University Marra
+kech Morocco'
},
{
'name' => "Laboratory of Interaction Plant\x{2010}Microo
+rganisms, Department of Biology University of Fribourg Fribourg Switz
+erland"
}
],
'Nafis',
'Ahmed',
[
{
'name' => 'Laboratory of Biology and Biotechnology of Mi
+croorganisms Faculty of Sciences Semlalia Cadi Ayyad University Marra
+kech Morocco'
}
],
'Baz',
'Mohamed',
[
{
'name' => 'Laboratory of Biology and Biotechnology of Mi
+croorganisms Faculty of Sciences Semlalia Cadi Ayyad University Marra
+kech Morocco'
}
],
'Mauch',
'Felix',
[
{
'name' => "Laboratory of Interaction Plant\x{2010}Microo
+rganisms, Department of Biology University of Fribourg Fribourg Switz
+erland"
}
],
'Barakate',
'Mustapha',
[
{
'name' => 'Laboratory of Biology and Biotechnology of Mi
+croorganisms Faculty of Sciences Semlalia Cadi Ayyad University Marra
+kech Morocco'
},
{
'name' => 'Agrobiosciences & Fertilizers Program Uni
+versity Mohammed IV Polytechnic (UM6P) Benguerir Morocco'
}
]
];