Is it possible to split Individual elements of JSON query into separate rows in different table?

Hi Guys,

I have got QueryJSON column which gives me array of elements like this below

{
  "comments": [
    {
      "text": "Congratulations!! The promo is so good and genuine, I’m sure the book is amazing. The title itself is so captivating. Good luck for another round of success.♥️",
      "created_at": 1713240457,
      "sentiment": 1,
      "like_count": "",
      "commenter": "aurabymona"
    },
    {
      "text": "@masoomminawala I’ve been following your work for a little while now and have developed a deep admiration for your authenticity and relatability. This post made me smile, look forward to reading the book. 🤗",
      "created_at": 1713170357,
      "sentiment": 1,
      "like_count": "",
      "commenter": "nicole_machado_92"
    },
    {
      "text": "Looking forward to reading it ❤️",
      "created_at": 1713170450,
      "sentiment": 0,
      "like_count": "",
      "commenter": "ridhi.khosla.jalan"
    },
    {
      "text": "Many congratulations Masoom 🤗\nMore power to you and every girl who dares to dream and push herself through every challenge and struggle till she makes it ! Much love ♥️",
      "created_at": 1713170222,
      "sentiment": 1,
      "like_count": "",
      "commenter": "mindfulliving_by_manik_kaur"
    }
]
}

This value is fetched via an API everyday and it gets stored in the JSON query column.

Is there anyway I can Put “text” and “sentiment” into a separate table, without using Make or Zapier?

I implemented it using Make but want to know wether there is any other way without using make.

Thank you in advance for your help.

Regards,
Dilip

You can use Glide API directly from the app. Here a resource I made that explain how to do that: Bulk Edit Column Values Across Multiple Rows in Glide with User-Specific Column Compatibility

You must change the kind set column values to add row.

Not sure if the question is still relevant.
Anyway, I can propose two options.

  1. If “text” and “sentiment” info need to be STORED in the separate table, you can use Glide Workflows webhook to get source JSON, iterate array items with loop, parse and store needed values.
    2.When your task is just to put info into ANY table to display it (Collection component, Chat, Choice) use miracle method:
  • Helper table with enough pre-created rows and row index calculation based on Row IDs;
  • Template column to generate JSON query text to get comment item from JSON
  • Query JSON column to get comment item JSON on separate rows
  • Query JSON column to get needed info from each comment
1 Like

Hi @savvvit ,

Thank you for the reply. Let me give it a try in my coming project where I will be needing this feature.

Thank you again.

Regards,
Dilip