Then display in a column the JSON objects only from the order you need (based on the filter you use), join these JSON object (JSON Payload) in another column, and then in your invoice tab use a lookup to retrieve the JSON Payload.
@Darren_Murphy, correct me if I’m wrong, but you can’t feed arrays into the Make JSON column, correct? I mean, short of creating a joined list and adding square brackets in a template beforehand, but I think I recall double quotes getting in the way. I assume on it’s own, it can only create a flat single level JSON object?
(Actually I scrapped the whole JSON model because JQ Query was murder on my CPU when parsing everything back out. Found that normal arrays and indexed single value columns were much faster for what I needed.)
yeah, correct. Flat structures only. To be honest, I don’t use it that often. If I’m worried that one of my key/value pairs could contain data that will break the JSON, then I’ll URL-Encode it.
I haven’t used the JSON.parse() function in a JS code yet, but instead, I’ve used the JQ plugin so far with no problems (maybe if I put more load on it I’ll see the mentioned problems) but my question is:
How can anyone make queries in JS like JQ plugin is able to do?
I use this kind of query (with JQ plugin) for example to know how many times 2 electric lines were under 100V reading my historical data and I got the number 178 easily!
or I wanted to know when a device had a temperature >= 80oC and JQ plugin returned me these values…
Can I do and get the same results using JSON.parse() in a JS code?
@gvalero The problem I had was with the Transform JSON plugin. 20+ rows and only 2 columns that used Transform JSON, and it was terribly slow. Every time I added a row it would take several seconds for the row to actually add to the table, and my CPU would max out. That was with pretty small JSON that I made within my tables. It wasn’t coming from an external sources, so a Fetch JSON column may actually work just fine.
Yes, what Jeff said.