Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima <ldipentima@veritasgenetics.com>
.map(key => [key, mapFn(key)])
.reduce((newValue, [key, newKey]) => ({
...newValue,
.map(key => [key, mapFn(key)])
.reduce((newValue, [key, newKey]) => ({
...newValue,
- [newKey]: CommonService.mapKeys(mapFn)(value[key])
+ [newKey]: (key === 'items') ? CommonService.mapKeys(mapFn)(value[key]) : value[key]
}), {});
case _.isArray(value):
return value.map(CommonService.mapKeys(mapFn));
}), {});
case _.isArray(value):
return value.map(CommonService.mapKeys(mapFn));