Skip to content

Commit

Permalink
fix array Length
Browse files Browse the repository at this point in the history
  • Loading branch information
toddgeist committed Feb 23, 2018
1 parent 5092406 commit b5c12c6
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 18 deletions.
Binary file modified JSONAdditions.fmp12
Binary file not shown.
34 changes: 17 additions & 17 deletions docs.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## JSON.ArrayConcat ( firstArray;secondArray)```/**
##JSON.ArrayConcat ( firstArray;secondArray)```/**
*
* JSON.ArrayConcat ( firstArray ; secondArray )
*
Expand All @@ -15,7 +15,7 @@
*
* @history 2017-05-07, cdelfs@delfsengineering.ca
*
*/```## JSON.ArrayFromRelated ( JSONField)```/**
*/```##JSON.ArrayFromRelated ( JSONField)```/**
*
* JSON.ArrayFromRelated( JSONField )
*
Expand All @@ -28,7 +28,7 @@
*
* @history 2017-06-01, todd@geistinteractive.com, created
*
*/```## JSON.ArrayLength ( array;path)```/*
*/```##JSON.ArrayLength ( array;path)```/*
*
* JSONArrayLength ( array ; path)
*
Expand All @@ -43,7 +43,7 @@
* @history 2017-04-09, todd@geistinteractive.com, created
*
* =====================================
*/```## JSON.ArraySort ( array;sortChildren)```/**
*/```##JSON.ArraySort ( array;sortChildren)```/**
*
* Sort an array
*
Expand All @@ -57,7 +57,7 @@
*
* @history 2017-06-20, michael.wallace@rcconsulting.com , gh #12
*
*/```## JSON.ContainsProperty ( json;name)```/**
*/```##JSON.ContainsProperty ( json;name)```/**
* =====================================
*
* Test if the JSON contains the give property
Expand All @@ -75,7 +75,7 @@
* @history 2017-04-09, todd@geistinteractive.com
*
* =====================================
*/```## JSON.FilterByExpression ( array;expression)```/**
*/```##JSON.FilterByExpression ( array;expression)```/**
*
* filters the array by a FileMaker expression
*
Expand All @@ -93,7 +93,7 @@
* @history, 2017-06-20, michael.wallace@rcconsulting.com
* @history 2017-04-01, todd@geistinteractive.com
*
*/```## JSON.Format ( text;descriptor)```/**
*/```##JSON.Format ( text;descriptor)```/**
*
* Formats the JSON for readability and
* checks if it is valid.
Expand All @@ -107,7 +107,7 @@
*
* @history 2017–11-24 created, todd@geistinteractive.com
*
*/```## JSON.GetValuesAtPath ( array;path)```/**
*/```##JSON.GetValuesAtPath ( array;path)```/**
*
* returns list containing only the values at that path
*
Expand All @@ -121,7 +121,7 @@
* @history 2017-04-01, todd@geistinteractive.com, created
*
* =====================================
*/```## JSON.IsValid ( json)```/**
*/```##JSON.IsValid ( json)```/**
*
* Tests to see if the JSON object is valid
*
Expand All @@ -133,7 +133,7 @@
* @history 2017–11-29 updated doc block for clarity, dave@geistinteractive.com
* @history 2017–11-23 created, todd@geistinteractive.com
*
*/```## JSON.Merge ( target;source)```/**
*/```##JSON.Merge ( target;source)```/**
*
* performs a shallow merge on two JSONObjects
*
Expand All @@ -146,7 +146,7 @@
* @history 2017–05-15 fixed gh# 1, todd@geistinteractive.com
* @history 2017–04-04 created, todd@geistinteractive.com
*
*/```## JSON.Pluck ( PluckList)```/**
*/```##JSON.Pluck ( PluckList)```/**
* =====================================
*
* Applies a list of JSON.PluckProps. to a $JSON.Pluck.From
Expand All @@ -159,7 +159,7 @@
* @history 2017-09-01 created, todd@geistinteractive.com
*
* =====================================
*/```## JSON.Pluck.From ( JSON)```/**
*/```##JSON.Pluck.From ( JSON)```/**
* =====================================
*
* helper function that store the source json to a known var
Expand All @@ -172,7 +172,7 @@
*
* @history 2017-09-01 created, todd@geistinteractive.com
*
*/```## JSON.Pluck.Prop ( PropToPluck;JSONType;As)```/**
*/```##JSON.Pluck.Prop ( PropToPluck;JSONType;As)```/**
* =====================================
*
* Plucks the prop from the source JSON and puts in the new JSON
Expand All @@ -187,7 +187,7 @@
* @history 2017-09-01 created, todd@geistinteractive.com
*
* =====================================
*/```## JSON.Push ( target;source;type)```/**
*/```##JSON.Push ( target;source;type)```/**
*
* JSON.Push ( target ; source ; type )
*
Expand All @@ -208,7 +208,7 @@
* - Added JSON type constant to accept source with all valid JSON elements
* @history 2017-11-29 created, dave@geistinteractive.com
*
*/```## JSON.Transform ( TransformationList)```/**
*/```##JSON.Transform ( TransformationList)```/**
* =====================================
*
* Applies a list of JSON.Transformation. to $JSON.Pluck.This
Expand All @@ -220,7 +220,7 @@
* @history 2017-11-17 created, todd@geistinteractive.com
*
* =====================================
*/```## JSON.Transform.ISODates ( path;Type)```/**
*/```##JSON.Transform.ISODates ( path;Type)```/**
* =====================================
*
* Performs an ISO Date and Time transform on the given property
Expand All @@ -233,7 +233,7 @@
*
* @history 2017-11-17 created, todd@geistinteractive.com
* =====================================
*/```## JSON.Transform.This ( JSON)```/**
*/```##JSON.Transform.This ( JSON)```/**
* =====================================
*
* helper function that store the source json to a known var
Expand Down
2 changes: 1 addition & 1 deletion functions/JSON.ArrayLength.fmfn
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@


Let ( [
_array = Substitute ( array ; [ "\r" ; "" ] ; [ "\n" ; "" ] );
_array = Substitute ( array ; [ "\r" ; "" ] ; [ "\n" ; "" ]; ["null" ; "\"NULL\""] );
_values = JSONListValues ( _array ; path );
_array = JSONGetElement ( _array ; path );
isArray = ( Left ( _array ; 1 ) & Right ( _array ; 1 ) = "[]" )
Expand Down

0 comments on commit b5c12c6

Please sign in to comment.