Partially populate JSON field

System Information
  • Strapi Version: 4.23.1
  • Operating System: Linux
  • Database: MySQL
  • Node Version: 20

In my data structure, I have a nested relationship, and I want to partially populate a JSON field from this relationship.

Here’s an illustrative data structure (note, the actual data is slightly different):

  • Room
  • Office: one-to-many relation to Room
  • Computer: many-to-one relation to Office

Each computer has a “config” JSON field:

{ 
"OS" : "Windows",
"CPU": "AMD",
...
}

I want to populate only the config["OS"] for a specific computer. Is this possible with Strapi? Specifically, for a given room, I’d like to return the office.computer.config.OS value.

Currently, using this API call:
api/rooms/?filters[uid][$eq]=room_id&populate[office][populate][computer][populate][config][fields][0]=OS

I receive the complete “config” in the response.

Since the config is quite extensive, and I don’t need all the details for each query, it would be helpful to filter out unnecessary data. How can I achieve this in Strapi?

Based on my current understanding this is not possible.