Core APIs
JSON
Best Match (Multiple)
1 min
evaluates and returns the first non empty match of two json objects provided the function looks to exclude nulls, non json values or json objects without any keys rules supported are "first not empty" api definition { "tab" "examples", "url" "https //orca pathfix com/functions/json/bestmatch", "name" "best match api", "method" "post", "request" { "pathparameters" \[], "queryparameters" \[], "headerparameters" \[], "bodydataparameters" \[], "formdataparameters" \[] }, "results" { "languages" \[ { "id" "28usdqyeh3qrdmtvamsqt", "code" "{\n \\"output\\" {\n\t\t\t\t\t\\"second json\\" \\"has value\\"\n\t\t\t\t}\n}", "language" "200" }, { "id" "yix64dyiudpjgbrfsfawb", "code" "{\n \\"message\\" \\"error\\"\n}", "language" "404" } ], "selectedlanguageid" "28usdqyeh3qrdmtvamsqt" }, "examples" { "languages" \[ { "id" "encjz9tstg38f0x taa4x", "code" "{\r\n\t\\"bestmatches\\" {\r\n\t\t\\"best match\\" {\r\n\t\t\t\\"input\\" \[\r\n\t\t\t\tnull,\r\n\t\t\t\t{\r\n\t\t\t\t\t\\"second json\\" \\"has value\\"\r\n\t\t\t\t}\r\n\t\t\t],\r\n\t\t\t\\"rule\\" \\"first not empty\\"\r\n\t\t\t\\"default\\" {\r\n\t\t\t\t\\"default json\\" \\"none found\\"\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}", "language" "json" } ], "selectedlanguageid" "encjz9tstg38f0x taa4x" }, "description" "\ncall the following api ", "currentnewparameter" { "label" "body parameter", "value" "bodydataparameters" } }