-
Is there a way to take advantage of the format('${columnName:name}', { columnName: 'id'})
// OUTPUT: '"id"' Is there a way to do this for nested fields in a jsonb column where the output would be format('${column:name}#>>${pathArray:csv}', {
column: namePath.slice(0, 1),
pathArray: `{${namePath.slice(1).join(',')}}`,
}); |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
There is no special provision for A little modified code than what you are using: format('${column.0:name}#>>${pathArray}', {
column: namePath,
pathArray: `{${namePath.slice(1).join(',')}}`,
}); i.e. you can use nested variable names, including indexes, and there's no point using |
Beta Was this translation helpful? Give feedback.
There is no special provision for
jsonb
in this library.A little modified code than what you are using:
i.e. you can use nested variable names, including indexes, and there's no point using
:csv
filter when you pass in just one pre-formatted string.