Hi,
I'm trying to build a query using the standard Node.JS CAP library via the SELECT.from(...).columns(...), and inside the columns function, I'm expanding some column, such as SELECT.from(...).columns((item) => item.column((c) => c`.*`)). So, the question is: how can I get a result with c`.*` columns as a flatten structure, not directly provided as an object?
I mean, after this query execution, I got the following structure:
{
"ID": "some-id",
"name": "some column value",
"column": {
"ID": "some-id-from-nested-column",
...
}
...
}
But, I want to receive something like:
{
"ID": "some-id",
"name": "some column value",
"column_ID": "some-id-from-nested-column"
...
}
Thanks!
Request clarification before answering.
Have you tried creating a view that solves your requirement. That way you maybe don't need any additional coding.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 5 | |
| 4 | |
| 4 | |
| 3 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.