Brian Dunning's FileMaker Custom Functions

@JsonFormatArray ( json )

Formats JSON Arrays in two columns: elements hierarchy and values.

  Average rating: 3.0 (2 votes) Log in to vote

Alex Zueiv   Alex Zueiv - Show more from this author
Tashkent
https://github.com/zueiv

Share on Facebook Share on Twitter

  Sample input:
@JsonFormatArray ( "[{\"language\":\"en\",\"str\":\"Hello World!\"},{\"language\":\"ru\",\"str\":\"Привет Мир!\"}]" )
  Sample output:
[
    {
        "language"  : "en",
        "str"       : "Hello World!"
    },
    {
        "language"  : "ru",
        "str"       : "Привет Мир!"
    }
]

  Function definition: (Copy & paste into FileMaker's Edit Custom Function window)

This CF is intended for developers. It allows you to visually separate the data from the document structure. This makes working with JSON API more comfortable.

Required FM16+ (no runtimes).

The old function (@JsonFormatElemets(); v1) was adopted and replaced here to work with JSON Arrays only, of any size. It is suitable to process arrays of JSON elements generated from DB records.

 

Comments

Alex Zueiv   Alex Zueiv, Tashkent
May 15, 2018
Version 2.0 of this CF works much faster:

http://www.briandunning.com/cf/2130
 

Log in to post comments.

 

Note: these functions are not guaranteed or supported by BrianDunning.com. Please contact the individual developer with any questions or problems.

Support this website.

This library has been a free commmunity resource for FileMaker users and developers for 20 years. It receives no funding and has no advertisements. If it has helped you out, I'd really appreciate it if you could contribute whatever you think it's worth: