JSON, Level: Advanced

September 2025 FM Training Livestream

Here are links to articles and resources related to today’s FM Training Livestream presentation.

YouTube link

Demo Files

Articles

Addendum

During my presentation, when I showed this example…

…I should have added:

Surrounding the “Blue” with a pair of ¶s is good-faith attempt to avoid false positives in case the list contains “Bluegrass”, “Blueberry, “Bluebird”, “Abluent”, etc.

The demo file has been updated to reflect this.

JSON, Level: Advanced, Version: FM 21 or later

Kentuckiana FM Developers JSON Presentation

Here are links to articles and resources related to today’s KYFMP presentation on JSON custom functions and JSONQuery.

YouTube links

Presentation and Demo Files

JSON and JSON Custom Functions

Other JSON-Related Articles

JSONQuery

 

JSON, Level: Advanced

January 2025 FM Training Livestream

Here are links to articles, custom functions, etc., related to my Wednesday, January 15th FM Training Livestream presentation on JSON custom functions.

YouTube link

Demo Files

JSON and JSON Custom Functions

Other JSON-Related Articles

JSONQuery

 

JSON, Level: Advanced, Version: FM 19.6 or later

JSONQuery Odds and Ends

This is a quick “odds and ends” post to share the current iteration of my JSONQuery sandbox file. Some of the examples are new; some are from presentations I gave earlier this year. Most of them illustrate one or more things you can do with this amazing custom function (a few of the examples don’t deal with JQ directly, but play a supporting role). The aim is to convey a tiny measure of the depth and breadth of what you can accomplish with JSONQuery.

Resources:

The Sandbox file requires FM 19.6 or later (but a few of the examples use features introduced in FM 21).

A bit of info in case this is the first time you’ve heard of JSONQuery. It is a custom function which operates on JSON, created and maintained by Steve Senft-Herrera.

Typically you’re going to point it at an array of objects…

…or an array of arrays…

…and it will return child elements matching your query parameters. Continue reading “JSONQuery Odds and Ends”

JSON, Level: Advanced, Version: FM 18 or later

JSONQuery v2 Conversation with Steve Senft-Herrera, part 2

Note 1: This conversation primarily focuses on new features and improvements in JQ v2. For a more general introduction to JSONQuery see the “Resources” section at the beginning of part 1.

Note 2: JSONQuery v2 is available here — https://github.com/steve-ssh/FMP_JSONQuery.

Continuation of JQ v2 conversation with Steve Senft-Herrera

Kevin Frank: There are a couple little improvements in v2 we haven’t mentioned yet. Is this a good time?

Steve Senft-Herrera: Sure.

KF: Okay, thanks. One that I really like is that you can now use “=” in place of “EQUALS” — you don’t have to, but you can. In v2 either of these will work…

JSONQuery ( $input ; "region" ; "EQUALS" ; "Asia" ; "" ; "name" )

or

JSONQuery ( $input ; "region" ; "=" ; "Asia" ; "" ; "name" )

KF: …whereas in v1 you had to write out “EQUALS”.

SSH: Yeah, I like that one too.

KF: Another improvement is that when “MATCH_ALL” is your Operator, you can now simply leave that argument blank. As per ex. 197 in the example file, these two statements are equivalent.

and

SSH: It’s a small change, but I like it because there is less to distract the eye from what really matters in the calculation: your input JSON, and the desired key or path to harvest — in this case, “address”.

KF: Completely agree.

The MAP Component

KF: You know there is an absolute favorite item on my list that hasn’t been mentioned yet, and it has to do with the simplification of MAP syntax.

SSH: That is definitely right there at the top of my list of favorite features also. Continue reading “JSONQuery v2 Conversation with Steve Senft-Herrera, part 2”

JSON, Level: Advanced, Version: FM 18 or later

JSONQuery v2 Conversation with Steve Senft-Herrera, part 1

Background

JSONQuery 2.0 was released last month with a wealth of new features, along with some improvements to existing features as well. Steve and I spoke about it recently, and we’ll get to that in just a moment. But first, for those who may not be familiar with JQ, here’s a bit of background information.

What is JSONQuery?

JSONQuery is a FileMaker custom function authored by Steve Senft-Herrera that enables you to query JSON (works with FM 18+).

Basic Things JSONQuery Does

1) Query – Allows for finding elements that match a supplied value, with a variety of options for operators.

2) Aggregate – Allows for returning an aggregate, e.g., SUM, AVG, LIST, etc., of values taken from either the matched elements, or all of the input.

3) Transform – Allows for customization of how the results are returned, with the option to pick-and-choose what attributes are included in the output, and how they are named.

Official Site

https://github.com/steve-ssh/FMP_JSONQuery

Other Resources

Introductory Remarks

Kevin Frank: Welcome back Steve. It’s been 3 years since we had our first JSONQuery conversation, and I’m so excited about JQ v2.

Steve Senft-Herrera: Thank you. I checked out the dates just before we met tonight, and saw that it is about 3 years.

KF: Hard to believe it’s been that long, and I want to congratulate you, because I know that it’s been a formidable effort on your part to get v2 out. And I speak for a lot of FM developers when I say we truly appreciate it.

SSH: Well, thanks. The formidable part, I think, was actually just managing my own life schedule to make time for it, more than the actual work that had to be done. There were long periods of time where the work was mostly finished, but just had to sit there patiently before I could get to it and take it to the next milestone. Now it’s officially out. Continue reading “JSONQuery v2 Conversation with Steve Senft-Herrera, part 1”

JSON, Level: Advanced, Version: FM 16 or later

Fast Summaries to JSON, part 2

This is a follow up to last week’s Fast Summaries to JSON and will assume the reader is familiar with that material.

Demo Files

After last week’s article appeared, a reader contacted me wondering whether the technique could be adapted to provide a more literal JSON representation of what was visible on-screen. The answer turns out to be yes, with a bit of additional work…

Continue reading “Fast Summaries to JSON, part 2”

JSON, Level: Advanced, Version: FM 16 or later

Fast Summaries to JSON

The other day some colleagues were discussing a need to produce a JSON representation of the data in a summary report. Long time readers of this blog will know that I am obsessed with fond of the Fast Summary technique, and it seemed like it might be a good fit for this challenge, so I built some demos to find out if that would be the case.

Demos 1 and 4 will work with FM 16 or later. Demos 2 & 3 utilize recently-added JSON features, so require FM 21 or later.

Continue reading “Fast Summaries to JSON”

JSON, Level: Advanced, Version: FM 18 or later

JSONQuery, part 2

Update 16 Sep 2024: JSONQuery 2.0 is now available.

Continuation of interview with Steve Senft-Herrera

[Editor’s note: the demo file and custom function have been significantly updated since part 1.]

Demo file:  CF_JSONQuery_20211130_0120_PUBLIC.fmp12.zip


KF: Welcome back Steve for part 2 of our JSONQuery conversation.

SSH: Thank you, Kevin.

KF: One thing we didn’t mention last time, because they were late-breaking additions, were the inequality operators.

Continue reading “JSONQuery, part 2”

JSON, Level: Advanced, Version: FM 18 or later

JSONQuery, part 1

Update 16 Sep 2024: JSONQuery 2.0 is now available.

Interview with Steve Senft-Herrera

[30 Nov 2021: Custom function and demo file have been updated. Some of the screen shots and example numbers referenced here in part 1 will deviate slightly from what you will find in the updated demo.]

Demo file:  CF_JSONQuery_20211130_0120_PUBLIC.fmp12.zip

KF: Good afternoon, Steve. You’ve been developing JSONQuery over the last few years, and today I have the honor of presenting and discussing it here with you on FileMaker Hacks. I was wondering if you could start out with a brief description of what JSONQuery is?

SSH: Sure. JSONQuery is a custom function, and it operates on JSON. Typically you’re going to be feeding it a large JSON array you’ve received back from the FileMaker Data API, or somebody else’s API, where each record is a JSON object within a larger parent JSON array, and the purpose of this function is to be able to find child elements in that parent array that match certain criteria and return just those elements to you. 

Above and beyond that it has a lot of bells and whistles, some of which I’m sure we’ll cover, but the main impetus for writing it was giving you an easy and fast way to essentially query a JSON array.

For example, let’s say you have an array filled with a lot of orders, but you only need to get the order items that are being shipped to a certain city, or to a certain state, then this function would allow you to easily obtain those elements in an efficient manner. Continue reading “JSONQuery, part 1”