@JsonFindKey ( json ; key )
Returns a list of paths to each instance of the specified key.
Average rating: 4.5 (2 votes) Log in to vote
Alex Zueiv - Show more from this author
Tashkent https://github.com/zueiv |
Function definition: (Copy & paste into FileMaker's Edit Custom Function window)
Returns a list of paths to each instance of the specified key.
To get the found element or its sibling, add the key to the path.
Comments
Oscar, Oscar Sep 25, 2022 |
||
Hello Alex, thanks for your function. Did you create any custom functions for returning the path from a value, I know you wrote this: "Let ( [ ARR = Substitute ( JSONSetElement ( "[]" ; 999 ; "{\"x\":1}" ; JSONObject ) ; "null" ; "{\"x\":0}" ) ; QTY = ValueCount ( JSONListKeys ( ARR ; "" ) ) ; SZ = Length ( ARR ) ; START = Get ( CurrentTimeUTCMilliseconds ) ; x = While ( [ LST = JSONListValues ( ARR ; "" ) ; i = 0 ; r = "" ] ; i < QTY and r = "" ; [ i = i + 1 ; o = GetValue ( LST ; i ) ; r = If ( JSONGetElement ( o ; "x" ) = 1 ; o ) ] ; r ) ; TEST_A = Get ( CurrentTimeUTCMilliseconds ) - START ;" There is a custom function to this? Thanks for your comment |
||
Alex Zueiv, Tashkent Sep 25, 2022 |
||
Hello Oskar, I think this is what you are looking for: https://www.briandunning.com/cf/2617 You may also want to look at the JSONQuery() CF available here: https://filemakerhacks.com/?s=JSONQuery |
||
Note: these functions are not guaranteed or supported by BrianDunning.com. Please contact the individual developer with any questions or problems.