« Xojo Stammtisch in Wi… | Home | DynaPDF 4 for PHP »

JSON Sort

In last prerelease we added JSON sort function to our FileMaker and Xojo plugins.

For FileMaker:

MBS( "JSON.Sort"; json )

For Xojo:

Sort method in JSONMBS class

Both use in-place sorting of the elements for arrays and object keys.
Here two examples:

[9,4,3.2,3.1,123]
returns
[3.1, 3.2, 4, 9, 123]

and

{ "last": 1, "First": 2, "Test": 3, "abc": 4}
returns
{ "abc": 4, "First": 2, "last": 1, "Test": 3 }

As you see it sorts text case insensitive. If you sort a single number, text or boolean value, we just return it as is.

We hope you enjoy the new functions. Please do not hesitate to contact us with questions.
22 06 19 - 16:52