@Darren_Murphy. I’m in way over my “no-code” skill level here and having a hard time replicating your example. Could you show me what your template looks like in the JSON column?
Also, I need to split the JSON data into columns instead of rows. In my table, each row is a booking and I’m trying to break out the charges for each booking.
what is the source of your JSON? is it google script? you gonna have a problem there, with numbers and TRUE/FALSE, being not a string… it will give you a hard time to split
It’s being pulled into AirTable from the API of my property management system. All the other booking data comes in great. It’s just this one list of charges that’s a problem.
I do not have any experience with air tables… in google sheets, I will make a response array.toString()…
do you have an option in AirTable to convert values to text?
switch back… there is nothing more powerful than a combination of Google Sheets + Scripts + G WebApp + Glide App! (don’t use Glide Page… you will miss out on CSS)
Darren’s code will work, you just need to modify it a little, because you don’t have headers… Thanks, @Darren_Murphy !!! super fast and columns saver method… no need for templates, slicing, join columns, split columns, and single value columns… from JSON straight to split column… WOW… love it!!!
Are the values of your charges column static values/text already saved or are they
created dynamically every time your App is running and makes API requests?
The problem was how to parse only the data i needed from a JSON string and place each piece into separate columns. The Transform JSON function wasn’t working but @Darren_Murphy’s JavaScript technique along with your tweak worked perfectly once I figured out how to use the P2 field in the JavaScript column.
Let’s play some scenarios in order to be more efficient if the circunstancies allow it:
how many rows (bookings) does your table have? Let’s assume that it has 2,000 rows.
if your APP is used by 5 users and each one opened it 3 times in 1 hour to see the charges, did your management system API have to handle 30,000 requests in 1 hour?
It’s too much data and work according to my point of view.
Wouldn’t it be better to parse the JSON payload only when the user presses the details screen?
I mean, the user sees the customer list from your APP, if he wants to see a specific charge list belonging to a customer, the APP will load and show the Details screen and from this point on, your app will fire an API call requesting data from that specific customer and then parse the JSON payload putting that information into multiple columns (as many as you want).
Probabilistically (I think), your API must work 1-2% only in this case and your APP should be faster.