Convert Data from Glidetable into JSON Type

Hi Community

Is there a video or guide how to convert a set of data into JSON type?

Currently I have create a column array Invoice Details

Convert into a List

Then Transform into JSON

Kindly advise if this is the correct way? Any better method?

Any advise is deeply appreciated.

I saw this yesterday and forgot to respond.
Your approach is all wrong. The Transform JSON plugin is used to extract data from a JSON data structure, not to create one.

Creating a JSON object inside Glide can be as simple as a single template column. Below is a short tutorial I made a while back:

6 Likes

Awesome… Let me check

1 Like

Hey, Darren.
Thanks for the tutorial, it may help big time.

Nevertheless, one question: we have a column called “Make JSON Object”, couldn’t it work too, in an easier way?
I’m having some trouble setting this column up, and I can’t find any documentation on it.

Thanks again.

yeah, for sure. Definitely use the Make JSON Object column. It’s much easier, and it also guarantees that you’ll get valid JSON - which may not always be true if you use a template column.

The way it works is you have to define a series of keys and values in pairs. So the first pair are k1 & v1, then k2 & v2, and so on.

If we use the Users table as an example, and lets say we want to create an object that contains the Users Name and Email, you’d set it up as follows:

  • k1: name
  • v1: replace with the Name column
  • k2: email
  • v2: replace with the Email column

Like so:

Note: there is an even newer column (that can be enabled in Previews) that does the same thing and allows you to add an unlimited number of key/value pairs:

CleanShot 2023-08-17 at 21.39.13@2x

3 Likes

JSON Object and JSONata are my favorite thing nowadays.

2 Likes

Wow, perfect!

I was about to ditch the JSON column and use a template, since the first is limited to 12 values only. But then you gifted me with this newer column, thanks!! This should be it, I’ll use the “JSON Object” column.

1 Like

And you’ll enjoy it a hell lot. It’s much easier to work with that column, in my honest opinion.

2 Likes