Advanced JSON Array Object Column | Query Properties as JSON Array

Edited Request:

Original Request:

I frequently use JSON Templates to build custom AI components in my clients’ applications. However, I’ve noticed that when working with JSON arrays, I often need to create a dedicated JSON Template column in the entity table for each specific JSON array used in queries or relations.

It would be beneficial to introduce a new column type that supports JSON queries across multiple properties in queries and relations.

Exemple without this feature:
Table1 has property1, property2 and property3 and a json template for these three properties.
Table2 has a query on table1, a joined list column on the json template from the query, a template column to make the array “[” + joined list + “]”.

Exemple with this feature:
Table1 has property1, property2 and property3.
Table2 has a query on table1, an advanced JSON query column that result in [{property1:“”, property2:“”,property3:“”},{property1:“”, property2:“”,property3:“”},{property1:“”, property2:“”,property3:“”}]

I might be missing something, but wouldn’t a lookup here instead of a joined list get you an array in a single step?

No, because i want a JSON array [{},{}] and also lookup isn’t supported in AI Component and JSON query.

But a lookup of a JSON Object or JSON Template column does return a JSON array. Here is an example:

In the above:

  • colvalues: JSON Object column defining column values for each row
  • mutations: JSON Template column which accepts previous column and returns a mutation
  • query: Query column matching rows of interest
  • allMutations: Lookup column targeting the Query. Returns an array of mutations
  • payload: JSON Template column that creates JSON body from the array of mutations

Yes I know that is possible. What I would like to have in Glide is the ability to use Query JSON with a query column as the source. That way, I won’t need to add JSON Template for all use cases in entity tables.

I’m not sure I follow. Can you show me an example?

You cannot use a JSON Object column to retrieve multiple properties from a query and output them as an array.



Here, you can’t access query properties. However, it would be very beneficial to have the ability to output a JSON array containing the specified properties. For example:

[
   {
      "prop1":"value of row 1's prop1",
      "prop2":"value of row 1's prop2"
   },
   {
      "prop1":"value of row 2's prop1",
      "prop2":"value of row 2's prop2"
   },
   "..."
]

Currently, the workaround to achieve the desired result involves the following steps:

  1. Open the queried table.

  2. Add a JSON Object column:

  3. In the main table, include a joined list column:


    Make sure to separate values by a comma:

  4. Create a Template column to add array brackets around the joined list:


  5. Finally, add a JSON Template column to format the template into valid JSON:

It would be much easier and beneficial to have the ability to create a JSON Object Array directly.

I may consider renaming my feature request.

1 Like