How to get nested data from linked table (like mongo populate) in API

Suppose I have two tables users and projects
In users, there is a field called projects which is a link to projects

Now, when I get a row of users table through GET api, I get the data in this format

...
"projects": [
{
    "id": 1,
    "value": "project1"
},
...
]
....

The problem is that projects table also has other fields that I want to get populated in the objects of array for ex. progress or timestamp.

I tried createing lookup for those but they are coming as separate fields through the api instead of concatenating inside the object.

Any help is appreciated

Hi @mrloop, it’s currently only possible to join in values from another table by creating a lookup field. It will be added as a separate field in the table, but you can match the index of the item in the field with each other.

...
"projects": [
  {
    "id": 1,
    "value": "project1"
  },
  {
    "id": 1,
    "value": "project2"
  },
],
"lookup": [
  {
    "value": "field matching project1"
  },
 {
    "value": "field matching project2"
  }
]

I guess that’s the only workaround, provided, I hope, that the array order is deliberately consistent through all lookups.

Yes, this is deliberately consistent.