These are customized bindings/functions that have been developed for use only within the Fuuz Platform.
Type | Category | Name | Signature | Description | Example |
Frontend | Clipboard | $writeToClipboard() | $writeToClipboard(data) | Write data to clipboard | $writeToClipboard({"a":1}) |
Frontend | Clipboard | $readFromClipboard() | $readFromClipboard() | Read data from clipboard | $readFromClipboard() |
Frontend | Other | $addNotificationMessage(title, options) | Adds a notification message to the UI for the current user, optionally displaying a snackbar. Severity can be info, error, warning, or success. Note: This binding is frontend-only. | $addNotificationMessage("Error processing request", { | |
Frontend | Other | $navigateBack() | Navigate back one page. | $navigateBack() | |
Frontend | Other | $navigateTo(pathname,options) | Navigate to the pathname provided. | $navigateTo('/system/configuration/calendars?CalendarTable.view=Default',{'newWindow': true, 'replace': false }) | |
Frontend | Other | $navigateReload() | Reload the current page. | $navigateReload() | |
Frontend | Other | $showAlertDialog(message,options) | Show an alert dialog, it operates identically to the alert HOC function | $showAlertDialog("Text to display",{ | |
Frontend | Other | $showConfirmDialog(message,options) | Show Confirm Dialog, it operates identically to the confirm HOC function. | $showConfirmDialog("Text to display", | |
Frontend | Other | $showFormDialog(object) | Show Form Dialog, it operates identically to the showFormDialog HOC function. It displays a form from the provided json object. | $showFormDialog( | |
Frontend | Screen Designer | $loadData() | $components.Table1.fn.loadData({filter: { field : {condition : value}}, rowLimit: 500}) | Load data from backend in a table, with filter and pagination, | $components.Table1.fn.loadData({filter: { |
Frontend | Screen Designer | $search() | $components.Table1.fn.search( {rowsPerPage : 500}) | Search data in a table base on the filter provided in filter form, | $components.Table1.fn.search({rowsPerPage : 500}) |
Frontend | Screen Designer | $setData() | $components.Table1.fn.setData([{id : 1, field1 : "value1", field2 : "value2"},{id : 2, field1 : "value1", field2 : "value2"}]) | Set custom data in a table, overwrite the entire table data, | $components.Table1.fn.setData([{id : 1, field1 : "value1", field2 : "value2"},{id : 2, field1 : "value1", field2 : "value2"}]) |
Frontend | Screen Designer | $addRows() | $components.Table1.fn.addRows([{id : 1, field1 : "value1", field2 : "value2"},{id : 2, field1 : "value1", field2 : "value2"}]) | Add custom rows to the end of table | $components.Table1.fn.addRows([{id : 1, field1 : "value1", field2 : "value2"},{id : 2, field1 : "value1", field2 : "value2"}]) |
Frontend | Screen Designer | $updateRows() | $components.Table1.fn.updateRows([{id : 1, field1 : "value1", field2 : "value2"},{id : 2, field1 : "value1", field2 : "value2"}]) | Match rows based on "id" from that object and update rows already in the table, | $components.Table1.fn.updateRows([{id : 1, field1 : "value1", field2 : "value2"},{id : 2, field1 : "value1", field2 : "value2"}]) |
Frontend | Screen Designer | $upsertRows() | $components.Table1.fn.upsertRows([{id : 1, field1 : "value1", field2 : "value2"},{id : 2, field1 : "value1", field2 : "value2"}]) | Match rows based on "id" from that object and add new rows that aren't already in the table, also update rows that are already in the table, | $components.Table1.fn.upsertRows([{id : 1, field1 : "value1", field2 : "value2"},{id : 2, field1 : "value1", field2 : "value2"}]) |
Frontend | Screen Designer | $deleteRows() | $components.Table1.fn.deleteRows([id1,id2,id3]) | Delete row in a table by id, | $components.Table1.fn.deleteRows([1,2,3]) |
Frontend | Screen Designer | $selectRow() | $components.Table1.fn.selectRow([id1,id2,id3]) | Select row in a table, | $components.Table1.fn.selectRow([1,2,3]) |
Frontend | Screen Designer | $deselectRow() | $components.Table1.fn.deselectRow([id1,id2,id3]) | Deselect selection of row in a table, | $components.Table1.fn.deselectRow([1,2,3]) |
Frontend | Screen Designer | $toggleRowSelection() | $components.Table1.fn.toggleRowSelection([id1,id2,id3]) | Toggle selection row in a table, | $components.Table1.fn.toggleRowSelection([1,2,3]) |
Frontend | Screen Designer | $selectAllRows() | $components.Table1.fn.selectAllRows() | Select all rows, regardless of filtering and rows that are not visible due to grouping being enabled and their groups not expanded, | $components.Table1.fn.selectAllRows() |
Frontend | Screen Designer | $deselectAllRows() | $components.Table1.fn.deselectAllRows() | Clear all row selections, regardless of filtering, | $components.Table1.fn.deselectAllRows() |
Frontend | Screen Designer | $selectAllFiltered() | $components.Table1.fn.selectAllFiltered() | Select all filtered rows, | $components.Table1.fn.selectAllFiltered() |
Frontend | Screen Designer | $deselectAllFiltered() | $components.Table1.fn.deselectAllFiltered() | Clear all filtered selections, | $components.Table1.fn.deselectAllFiltered() |
Frontend | Screen Designer | $setSelectedRows() | $components.Table1.fn.setSelectedRows([id1,id2,id3]) | Set selection of rows by id(s) in a table, | $components.Table1.fn.setSelectedRows([1,2,3]) |
Frontend | Screen Designer | $setValue() | $components.Form1.fn.setValue(field, data) | Set value of field in a form, | $components.Form1.fn.setValue('Text1', 'dummy text') |
Frontend | Screen Designer | $focus() | $components.Form1.fn.focus(field) | Set cursor focus of field in a form | $components.Form1.fn.focus('Text1') |
Frontend | Screen Designer | $blur() | $components.Form1.fn.blur(field) | Blur cursor focus of field in a form | $components.Form1.fn.blur('Text1') |
Frontend | Screen Designer | $loadData() | $components.Form1.fn.loadData() | Reload data in a form, Replace Form1 with form name | $components.Form1.fn.loadData() |
Frontend | Screen Designer | $getUpdateMutation() | $components.Form1.fn.getUpdateMutation() | Get mutation query for update data in a form, | $components.Form1.fn.getUpdateMutation() |
Frontend | Screen Designer | $getUpdatePayload() | $components.Form1.fn.getUpdatePayload() | Get payload for mutation of data in a form, | $components.Form1.fn.getUpdatePayload() |
Frontend | Screen Designer | $validate() | $components.Form1.fn.validate() | Validate form and return array of errors, | $components.Form1.fn.validate() |
Frontend | Screen Designer | $save() | $components.Form1.fn.save(isSaveAll = false) | Save the details of a form, | $components.Form1.fn.save() |
Frontend | Screen Designer | $getVariables() | $components.Form1.fn.getVariables() | Get all the variables of the form, | $components.Form1.fn.getVariables() |
Frontend | Screen Designer | $delete() | $components.Form1.fn.delete() | Delete the form data, | $components.Form1.fn.delete() |
Frontend | Screen Designer | $hide() | $components.Container1.fn.hide() | Container visibility set to hide | $components.Container1.fn.hide() |
Frontend | Screen Designer | $show() | $components.Container1.fn.show() | Container visibility set to show | $components.Container1.fn.show() |
Frontend | Screen Designer | $toggle() | $components.Container1.fn.toggle() | Container visibility toggle, | $components.Container1.fn.toggle() |
Frontend | Screen Designer | $resetHidden() | $components.Container1.fn.resetHidden() | Container visibility reset all the hidden fields, | $components.Container1.fn.resetHidden() |
Frontend | Screen Designer | $execute() | $components.ActionButton1.fn.execute({field:value}) | Execute action of other action button, | $components.ActionButton1.fn.execute({'Text1': 'dummy text'}) |
Backend | EDINation | $readEDI(x12) | $readEDI(string,object,object) | Reads an EDI Document with EDINations API and returns JSON | $readEDI('x12',{"fileName":"","fileContents":""},{ |
Backend | EDINation | $readEDI(edifact) | $readEDI(string,object,object) | Reads an EDI Document with EDINations API and returns JSON | $readEDI('edifact',{"fileName":"","fileContents":""},{ |
Backend | EDINation | $writeEDI(x12) | $writeEDI(string,object,object) | Writes JSON EDI document to EDINation returning EDI String | $writeEDI('x12',data,{ |
Backend | EDINation | $writeEDI(edifact) | $writeEDI(string,object,object) | Writes JSON EDI document to EDINation returning EDI String | $writeEDI('edifact',data,{ |
Backend | EDINation | $validateEDI(x12) | $validateEDI(string,object,object) | Validates JSON EDI document against EDINation API | $validateEDI('x12',data,{ |
Backend | EDINation | $validateEDI(edifact) | $validateEDI(string,object,object) | Validates JSON EDI document against EDINation API | $validateEDI('edifact',data,{ |
Backend | EDINation | $ackEDI(x12) | $ackEDI(string,object,object) | Writes an EDI document and returns an ACK | $ackEDI('x12',data,{ |
Backend | EDINation | $ackEDI(edifact) | $ackEDI(string,object,object) | Writes an EDI document and returns an ACK | $ackEDI('edifact',data,{ |
Shared | Files | $pdfToJson() | $pdfToJson(string, object?) | Converts a PDF file into JSON | $pdfToJson("+kUKKbEVU8fDa2jHfjwcXdMDKzVt5S8s...") |
Shared | Files | $mergePDFs() | $mergePDFs([string]) | Merges multiple base-64 encoded PDFs into a single document. | $mergePDFs(["+kUKKbEVU8fDa2...", "+kUKKbEVU8fDa2...", ...]) |
Shared | Files | $rotatePDF() | $rotatePDF(string, angle) | Rotates a base-64 encoded PDF to a specified angle in degrees. Angle must be a multiple of 90. | $rotatePDF("+kUKKbEVU8fDa2...", 90) |
Shared | Calendars | $eventsBetween() | $eventsBetween(momentObject,momentObject,object) | Returns the events for a calendar between two dates. | $eventsBetween($moment(),$moment(),calendar) |
Shared | Calendars | $getEventEnd() | $getEventEnd(object) | Returns the end of the first occurrence of an event. | $getEventEnd(event) |
Shared | Calendars | $getEventEnd() | $getEventEnd(object,momentObject) | Returns the end of the next occurrence of an event after the given moment. | $getEventEnd(event,$moment()) |
Shared | Calendars | $getEventsAt() | $getEventsAt(momentObject, object) | Returns the events occurring in the given moment. | $getEventsAt($moment("2000-07-23T18:36:00.000Z"), calendar) |
Shared | Calendars | $getEventsAt() | $getEventsAt(string, object) | Returns the events occurring in the given moment. | $getEventsAt("2000-07-23T18:36:00.000Z", calendar) |
Shared | Calendars | $getAvailabilityBetween() | $getAvailabilityBetween(momentObject,momentObject,object) | Returns the events for a calendar between two dates, categorized by availability. | $getAvailabilityBetween($moment(), $moment(), calendar) |
Shared | Calendars | $availableAt() | $availableAt(momentObject, calendar) | Returns true if there is at least one event marked as available in the given moment. | $availableAt($moment(), calendar) |
Shared | Core | $cuid() | $cuid() | Generates a CUID. | $cuid() |
Shared | Core | $uuid() | $uuid() | Generates a V4 UUID. | $uuid() |
Shared | Core | $throw() | $throw(string, object?) | Throws a ThrowBindingError which halts execution of the transform. The error will use the provided string as message and the data property will include any properties on the object passed to the second parameter. | $throw("Oh no, something broke!", { "moreDetail": true }) |
Shared | Core | $coalesce() | $coalesce(array) | Returns the first value from the array that is not null or undefined. | $coalesce([undefined, null, "test"]) |
Shared | Core | $identity() | $identity(any) | Returns the value it is given. | $identity("hello") |
Shared | Core | $tryCatch() | $tryCatch(function, function) | Will return a new function that takes the same arguments as first function and will run in a try catch block. The catching function will have to be either anonymous or have a signature matching the trying function with the addition of a starting error object | $tryCatch($fn1, $fn2) |
Shared | Core | $nullIf() | $nullIf(any, any) | Returns null if the given value is equal to the comparison value. Otherwise, it returns the value. | $nullIf("", "") |
Shared | Core | $cronConverter() | $cronConverter(string, string?) | Returns the object from cron-converter. | $cronConverter("*/10 9-17 1 * *", "Etc/UTC") |
Shared | Core | $wait() | $wait(number) | Pause execution for the given number of milliseconds. | $wait(1000) |
Shared | Core | $retry() | $retry(function, object?, function?) | Returns a function to retry a number of times. Options object accepts retries and delay (ms) between retries. Optional function to return when a retry fails. | $retry(function() { $http("get", {"url": "https://testnotreal.com"}) }, {"retries": 5, "delay": 1000}) |
Shared | Core | $arrayToCsv() | $arrayToCsv(array<object>, object?) | Converts an array of objects into a CSV string. Documentation on options are located at . | $arrayToCsv([ |
Shared | Core | $csvToArray() | $csvToArray(string, object?) | Converts a csv string into an array of objects. Documentation on options are located at . | $csvToArray('Name,City,State John,"Orange County",CA Bill,Troy,MI Ted,Waterford,MI', |
Shared | Core | $epcToUrn() | $epcToUrn(string, object?) | Converts an RFID tags EPC value to a URN value. Default standard is set to GRAI96. User defined parsing logic can be implemented using the userDefined object in options. | $epcToUrn('330C4C06E8700440000AB45C', |
Shared | Core | $numeral() | $numeral(value) | Converts a JSON value to a Numeral.js object for parsing or formatting. Documentation is located at . | $numeral("5000").format("0,0.00") |
Shared | Core | $parseInt() | $parseInt(string, number?) | Converts a string to a number using the default or a specified base (radix, default 10) | $parseInt('FF00', 16) |
Shared | Core | $decimalToString() | $decimalToString(array<number>, string?) | Decodes a decimal array into a string using the specified encoding (defaults to utf-8). For a list of supported encodings check | $decimalToString([116, 101, 115, 116], 'utf-8') |
Shared | Core | $parseNumber() | $parseNumber(value) | Converts a JSON value to a number. Returns undefined if the provided value is unable to be parsed into a number. | $parseNumber("5") |
Shared | Core | $pluralize() | $pluralize(string, string) | Returns the provided string in pluralized form, using standard grammatical rules for the provided locale. | $pluralize('dog','en') |
Shared | Core | $singularize() | $singularize(string, string) | Returns the provided string in singular form, using standard grammatical rules for the provided locale. | $singularize('dogs', 'en') |
Shared | Core | $camelCase() | $camelCase(string) | Returns the provided string in lowerCamelCase. | $camelCase('one two three') |
Shared | Core | $snakeCase() | $snakeCase(string) | Returns the provided string in snake_case. | $snakeCase('one two three') |
Shared | Core | $kebabCase() | $kebabCase(string) | Returns the provided string in kebab-case. | $kebabCase('one two three') |
Shared | Core | $lowerFirst() | $lowerFirst(string) | Returns the provided string with the first character changed to lowercase. | $lowerFirst('one two three') |
Shared | Core | $upperFirst() | $upperFirst(string) | Returns the provided string with the first character changed to uppercase. | $upperFirst('one two three') |
Shared | Core | $startCase() | $startCase(string) | Returns the provided string in Start Case. | $startCase('one two three') |
Shared | Core | $htmlEscape() | $htmlEscape(string) | Converts the characters "&", "<", ">", '"', and "'" in string to their corresponding HTML entities. | $htmlEscape("&") |
Shared | Core | $htmlUnescape() | $htmlUnescape(string) | Converts the HTML entities &, <, >, ", and ' in string to their corresponding characters. | $htmlUnescape("&") |
Shared | Core | $uriEscape() | $uriEscape(string) | URI escapes the given string. Does not handle the following characters: ?, =, /, and &. | ") |
Shared | Core | $uriUnescape() | $uriUnescape(string) | Reverses URI escaping on the given string. Does not handle the following characters: ?, =, /, and &. | ") |
Shared | Core | $uriEscapeComponent() | $uriEscapeComponent(string) | URI escapes the given string, including the following characters: ?, =, /, and &. | $uriEscapeComponent("?x=шеллы") |
Shared | Core | $uriUnescapeComponent() | $uriUnescapeComponent(string) | Reverses URI escaping on the given string, including handling of the following characters escape sequences: ?, =, /, and &. | $uriUnescapeComponent("%3Fx%3D%D1%88%D0%B5%D0%BB%D0%BB%D1%8B") |
Shared | Core | $markdownToHtml() | $markdownToHtml(string) | Convert markdown content to HTML. | $markdownToHtml('# Marked in Node.js Rendered by **marked**.') |
Shared | Core | $richTextToMarkdown() | $richTextToMarkdown(object) | Convert serialized RawDraftContent to Markdown | $richTextToMarkdown({ |
Shared | Core | $markdownToRichText() | $markdownToRichText(string) | Converts Markdown to serializable RichText objects | $markdownToRichText("**Markdown** text here") |
Shared | Core | $plainTextToRichText() | $plainTextToRichText(string) | Converts plain text to serializable RichText objects | $plainTextToRichText("Plain text here") |
Shared | Core | $richTextToPlainText() | $richTextToPlainText(object) | Convert serialized RawDraftContent to plain text. | $richTextToPlainText({ |
Shared | Core | $richTextToHTML() | $richTextToHTML(object) | Convert serialized RawDraftContent to HTML. | $richTextToHTML({ |
Shared | Core | $path() | $path(object, string | array<string>) | Returns the value at the provided path in the object. | $path({"parent":{"child":[1,2,3]}},"parent.child") |
Shared | Core | $omit() | $omit(object, array<string>) | Returns the object with the provided properties omitted. | $omit({"parent":{"child":[1,2,3],"name":"Daphne"}},"parent.name") |
Shared | Core | $pick() | $pick(object, array<string>) | Returns the object with only the provided properties included. | $pick({"parent":{"child":[1,2,3],"name":"Daphne"}},"parent.name") |
Shared | Core | $values() | $values(object) | Returns an array of values in the given object. | $values({"a":1,"b":2,"c":3}) |
Shared | Core | $mapValues() | $mapValues(object, function) | Returns an array of values in the given object based on the function. | $mapValues({"a":1,"b":2,"c":3}, function($v){$v}) |
Shared | Core | $mapKeys() | $mapKeys(object, function) | Returns an array of keys in the given object based on the function. | $mapKeys({"a":1,"b":2,"c":3}, function($v) { $v }) |
Shared | Core | $mergeDeep() | $mergeDeep(array<object>) | Returns an object which includes all properties from the provided objects, recursively merged. In the event that multiple objects contain the same property, properties from objects with higher array indexes override properties from lower array indexes. | $mergeDeep() |
Shared | Core | $has() | $has(object, string) | Returns true or false depending on whether the provided property exists in the provided object. | $has({"parent":{"child":[1,2,3],"name":"Daphne"}},"parent.name") |
Shared | Core | $toPairs() | $toPairs(object) | Returns an array of key-value pair arrays, in the shape of [ [ key1, value1 ], [ key2, value2] ]. | $toPairs({ "key": "value" }) |
Shared | Core | $fromPairs() | $fromPairs(array<array>) | Transforms an array of key value pairs into an object. | $fromPairs([["key", "value"]]) |
Shared | Core | $jsonParse() | $jsonParse(string) | Parses a string representation of a JSON value into the value it represents. | $jsonParse('{ "value": true }') |
Shared | Core | $jsonStringify() | $jsonStringify(any JSON type, object?) | Serializes a JSON value into a string. | $jsonStringify({ "value": true }, { "space": 2 }) |
Shared | Core | $chunk() | $chunk(array, number) | Creates an array of elements split into groups the length of size. If array can't be split evenly, the final chunk will be the remaining elements. | $chunk([1..200], 10) |
Shared | Core | $uniq() | $uniq(array) | Returns the provided array with duplicate values removed. Equality is determined by reference for objects. | $uniq([1,1,2,3,4,5,5,5]) |
Shared | Core | $partition() | $partition(array, function) | Creates an array of elements split into two groups, the first of which contains elements predicate returns truthy for, the second of which contains elements predicate returns falsey for. The predicate is invoked with one argument: (value). | $partition(a, function($v) {}); |
Shared | Core | $groupBy() | $groupBy(array, function) | Takes an array and a key function, returns an object. All values with the same key are added to an array property in the object named based on the key. | $groupBy([{ "id": 1, "name": "test 1" }, { "id": 1, "name": "test 2" }], function ($v) { $v.id }); |
Shared | Core | $indexBy() | $indexBy(array, function) | Similar to $groupBy, except the properties contain only the last matching element for the key. | $indexBy([{ "id": 1, "name": "test 1" }, { "id": 2, "name": "test 2" }, { "id": 1, "name": "test 3" }], function ($v) { $v.id }); |
Shared | Core | $uniqBy() | $uniqBy(array, function) | Similar to $uniq, except this function takes a function that returns the value to determine uniqueness by. | $uniqBy([{ "value": 1 }, { "value": 1 }], function ($v) { $v.value }); |
Shared | Core | $flatten() | $flatten(array, number?) | Given an array of arrays, this will flatten the arrays to the given depth. Depth defaults to 1. | $flatten([[[1]]], 2) |
Shared | Core | $first() | $first(array) | Returns the first element of the array. | $first([1, 2, 3]) |
Shared | Core | $last() | $last(array) | Returns the last element of the array. | $last([1, 2, 3]) |
Shared | Core | $takeFirst() | $takeFirst(array, number?) | Returns an array containing the first n element from the given array. | $takeFirst([1, 2, 3], 2) |
Shared | Core | $takeLast() | $takeLast(array, number?) | Returns an array containing the last n element from the given array. | $takeLast([1, 2, 3], 2) |
Shared | Core | $findFirst() | $findFirst(array, function) | Return the first element where the predicate function returns true. | $findFirst([obj1, obj2, obj3], myPredFunc) |
Shared | Core | $findLast() | $findLast(array, function) | Return the last element where the predicate function returns true. | $findLast([obj1, obj2, obj3], myPredFunc) |
Shared | Core | $findFirstIndex() | $findFirstIndex(array, function) | Return the first index where the predicate function returns true. | $findFirstIndex([obj1, obj2, obj3], myPredFunc) |
Shared | Core | $findLastIndex() | $findLastIndex(array, function) | Return the last Index where the predicate function returns true. | $findLastIndex([obj1, obj2, obj3], myPredFunc) |
Shared | Core | $flatMap() | $flatMap(array, function) | Returns a new transformed array but flatend. | $flatMap([1, 2, 3, 4, 5], myFunc) |
Shared | Core | $dropFirst() | $dropFirst(array, number) | Returns all but the first n elements of the given list | $dropFirst([1, 2, 3, 4, 5], 2) |
Shared | Core | $dropLast() | $dropLast(array, number) | Returns all but the last n elements of the given list | $dropLast([1, 2, 3, 4, 5], 2) |
Shared | Core | $partitionBetween() | $partitionBetween(array, function, function, object) | Partitions an array based on beginning and ending predicate functions, collecting all values between matching elements. | $partitionBetween([{ "name": "ST" }, { "name": "N1" }, { "name": "SE" }], function ($i) { $i.name = "ST" }, function ($i) { $i.name = "SE" }, { "includeEndElement": true }) |
Shared | Core | $isArray() | $isArray(any JSON type) | Determines whether the given value is an array. | $isArray([]) |
Shared | Core | $isString() | $isString(any JSON type) | Determines whether the given value is a string. | $isString("") |
Shared | Core | $isBoolean() | $isBoolean(any JSON type) | Determines whether the given value is a boolean. | $isBoolean(true) |
Shared | Core | $isInteger() | $isInteger(any JSON type) | Determines whether the given value is an integer number. | $isInteger(1) |
Shared | Core | $isFloat() | $isFloat(any JSON type) | Determines whether the given value is a floating point number. Integer numbers also count as floating point numbers as JSON only has a singular number type. | $isFloat(1.5) |
Shared | Core | $isNumber() | $isNumber(any JSON type) | Determines whether the given value is a number. | $isNumber(1.5) |
Shared | Core | $isObject() | $isObject(any JSON type) | Determines whether the given value is an object. | $isObject({}) |
Shared | Core | $isUndefined() | $isUndefined(any JSON type) | Determines whether the given value is undefined. | $isUndefined(undefined) |
Shared | Core | $isNil() | $isNil(any JSON type) | Determines whether the given value is null or undefined. | $isNil(null) |
Shared | Core | $isNaN() | $isNaN(any JSON type) | Determines whether the given value is NaN. | $isNaN(null) |
Shared | Core | $isEmpty() | $isEmpty(any JSON type) | Determines whether the given value is an empty array, object, or string. | $isEmpty({}) |
Shared | Core | $isNilOrEmpty() | $isNilOrEmpty(any JSON type) | Determines whether the given value is undefined, null, or an empty array, object, or string. | $isNilOrEmpty(null) |
Shared | Core | $pathSatisfies() | $pathSatisfies(object, string | array<string>, function) | Given an object, a path, and a predicate function, this function will return true if the predicate returns true for the value at the given path. | $pathSatisfies({ "name": "Henry Nord" }, "name", function ($v) { $v = "Henry Nord" }) |
Shared | Core | $visitPreorder() | $visitPreorder(array | object, function) | Uses a preorder traversal to visit each element of a JSON object and allows recursive replacement of any nested objects. | $visitPreorder(tree, function ($v) {( $merge([$v, { "hello": "world" }]); )}) |
Shared | Core | $convertCharacterSet() | $convertCharacterSet(string, string, string?) | Converts a string from a source encoding to a target encoding. | $convertCharacterSet("ä½ å¥½ï¼Œä¸–ç•Œ", "ascii") |
Shared | Core | $parseUrl() | $parseUrl(string) | Parse a url into a JSON Object. | $parseUrl("https://mfgx.io/path?query=true") |
Shared | Core | $urlStringify() | $urlStringify(any JSON type, optional json options) | Takes JSON data and optionally options from the qs library in json format and returns the JSON data formatted as querystring. | $urlStringify({"param1":1, "param2":"2"},{addQueryPrefix: true}) |
Shared | Core | $parseGraphQLStatement() | $parseGraphQLStatement(string) | Parse a GraphQL statement to the AST format | $parseGraphQLStatement() |
Shared | Core | $parseExpression() | $parseExpression(string) | Parse a JSONata expression to the AST format | $parseExpression("$sum(example.value)") |
Shared | Core | $semverParse() | $semverParse(any) | Attempt to parse a string as a semantic version, returning either a SemVer object or null. | $semverParse('1.2.3') |
Shared | Core | $semverValid() | $semverValid(string) | Return the parsed version, or null if it's not valid. The optional boolean argument will let you choose to interpret versions or ranges loosely | $semverValid('1.2.2') |
Shared | Core | $semverClean() | $semverClean(string, boolean?) | Clean a string to be a valid semver if possible. This will return a cleaned and trimmed semver version. If the provided version is not valid a null will be returned. This does not work for ranges. The optional boolean argument will let you choose to interpret versions loosely | $semverClean('1.2.2') |
Shared | Core | $semverInc() | $semverInc(string, string, boolean?, string?) | Return the version incremented by the release type (major, premajor, minor, preminor, patch, prepatch, or prerelease), or null if it's not valid. The third argument is an optional additional identifier string argument that will append the value of the string as a prerelease identifier | $semverInc('1.2.3', 'prerelease', 'beta') |
Shared | Core | $semverDiff() | $semverDiff(string, string, boolean?) | Returns difference between two versions by the release type (major, premajor, minor, preminor, patch, prepatch, or prerelease), or null if the versions are the same. An optional third argument can be passed in as a boolean which will let you choose to interpret versions or ranges loosely | $semverDiff('1.2.2', '2.0.1') |
Shared | Core | $semverMajor() | $semverMajor(string, boolean?) | Return the major version number. Optionally, include a boolean to interpret the version loosely | $semverMajor('1.2.2') |
Shared | Core | $semverMinor() | $semverMinor(string, boolean?) | Return the minor version number. Optionally, include a boolean to interpret the version loosely | $semverMinor('1.2.2') |
Shared | Core | $semverPatch() | $semverPatch(string, boolean?) | Return the patch version number. Optionally, include a boolean to interpret the version loosely | $semverPatch('1.2.2') |
Shared | Core | $semverPrerelease() | $semverPrerelease(string) | Returns an array of prerelease components, or null if none exist. | $semverPrerelease('1.2.3-alpha.1') |
Shared | Core | $semverCompare() | $semverCompare(string, string, boolean?) | Return 0 if v1 == v2, or 1 if v1 is greater, or -1 if v2 is greater. Sorts in ascending order if passed to Array.sort(). An optional third argument can be passed in as a boolean which will let you choose to interpret versions or ranges loosely | $semverCompare('1.2.2', '2.0.1') |
Shared | Core | $semverRcompare() | $semverRcompare(string, string, boolean?) | The reverse of compare. Sorts an array of versions in descending order when passed to Array.sort(). An optional third argument can be passed in as a boolean which will let you choose to interpret versions or ranges loosely | $semverRcompare('1.2.2', '2.0.1') |
Shared | Core | $semverCompareLoose() | $semverCompareLoose(string, string) | Compare while interpreting versions and ranges loosely. Be more forgiving about not-quite-valid semver strings. (Any resulting output will always be 100% strict compliant, of course.) For backwards compatibility reasons, if the options argument is a boolean value instead of an object, it is interpreted to be the loose param | $semverCompareLoose('1.2.2', '2.0.1') |
Shared | Core | $semverCompareBuild() | $semverCompareBuild(string, string) | The same as compare but considers build when two versions are equal. Sorts in ascending order if passed to Array.sort(). v2 is greater. Sorts in ascending order if passed to Array.sort(). | $semverCompareBuild('1.2.2', '2.0.1') |
Shared | Core | $semverSort() | $semverSort(array<string>, boolean?) | Sorts an array of semver entries in ascending order using compareBuild(). Additionally, an optional argument can be passed in as a boolean which will let you choose to interpret versions or ranges loosely | $semverSort([ 'v0.0.9','v0.0.2','1.1.1', 'v0.1.1', '1.2.2', '2.0.1' ]) |
Shared | Core | $semverRsort() | $semverRsort(array<string>, boolean?) | Sorts an array of semver entries in descending order using compareBuild(). Optionally, an additional argument can be passed in as a boolean which will let you choose to interpret versions or ranges loosely | $semverRsort([ 'v0.0.9','v0.0.2','1.1.1', 'v0.1.1', '1.2.2', '2.0.1' ]) |
Shared | Core | $semverGt() | $semverGt(string, string, boolean?) | Greater than comparison. The third argument is optional and can be passed in as a boolean which will let you choose to interpret versions or ranges loosely | $semverGt('1.2.3', '9.8.7') |
Shared | Core | $semverLt() | $semverLt(string, string, boolean?) | Less than comparison. The third argument is optional and can be passed in as a boolean which will let you choose to interpret versions or ranges loosely | $semverLt('1.2.3', '9.8.7') |
Shared | Core | $semverEq() | $semverEq(string, string, boolean?) | Equality comparison. The third argument is optional and can be passed in as a boolean which will let you choose to interpret versions or ranges loosely | $semverEq('1.1.1', '1.1.1') |
Shared | Core | $semverNeq() | $semverNeq(string, string, boolean?) | Inequality comparison. The third argument is optional and can be passed in as a boolean which will let you choose to interpret versions or ranges loosely | $semverNeq('1.1.1', '1.1.1') |
Shared | Core | $semverGte() | $semverGte(string, string, boolean?) | Greater-than or equal-to comparison. The third argument is optional and can be passed in as a boolean which will let you choose to interpret versions or ranges loosely | $semverGte('1.2.3', '1.1.1') |
Shared | Core | $semverLte() | $semverLte(string, string, boolean?) | Less-than or equal-to comparison. The third argument is optional and can be passed in as a boolean which will let you choose to interpret versions or ranges loosely | $semverLte('1.2.3', '1.1.1') |
Shared | Core | $semverCmp() | $semverCmp(string, string, string, boolean?) | Pass in a comparison string, and it'll call the corresponding semver comparison function. "===" and "!==" do simple string comparison, but are included for completeness. Throws if an invalid comparison string is provided. The fourth argument is optional and can be passed in as a boolean which will let you choose to interpret versions or ranges loosely | $semverCmp('1.2.3', '<=', '1.1.1') |
Shared | Core | $semverCoerce() | $semverCoerce(string, string) | Coerces a string to SemVer if possible. | $semverCoerce('1.2.3', '1.1.1') |
Shared | Core | $semverSatisfies() | $semverSatisfies(string, string, boolean?) | Return true if the version satisfies the range. The third argument is optional and can be passed in as a boolean which will let you choose to interpret versions or ranges loosely | $semverSatisfies('1.2.3', '1.x || >=2.5.0 || 5.0.0 - 7.2.3') |
Shared | Core | $semverMaxSatisfying() | $semverMaxSatisfying(array<string>, string, boolean?) | Return the highest version in the list that satisfies the range, or null if none of them do. The third argument is optional and can be passed in as a boolean which will let you choose to interpret versions or ranges loosely | $semverMaxSatisfying([ 'v0.0.9','v0.0.2','1.1.1', 'v0.1.1', '1.2.2', '2.0.1' ],'<1.1.1') |
Shared | Core | $semverMinSatisfying() | $semverMinSatisfying(array<string>, string, boolean?) | Return the lowest version in the list that satisfies the range, or null if none of them do. The third argument is optional and can be passed in as a boolean which will let you choose to interpret versions or ranges loosely | $semverMaxSatisfying([ 'v0.0.9','v0.0.2','1.1.1', 'v0.1.1', '1.2.2', '2.0.1' ],'<1.1.1') |
Shared | Core | $semverToComparators() | $semverToComparators(string, string, boolean?) | Mostly just for testing and legacy API reasons. The third argument is optional and can be passed in as a boolean which will let you choose to interpret versions or ranges loosely | $semverToComparators('<= 1.1.1','1.2.3') |
Shared | Core | $semverMinVersion() | $semverMinVersion(string, boolean?) | Return the lowest version that can possibly match the given range. The second argument is optional and can be passed in as a boolean which will let you choose to interpret versions or ranges loosely | $semverMinVersion('<= 2.1.2') |
Shared | Core | $semverValidRange() | $semverValidRange(string, boolean?) | Return the valid range or null if it's not valid. The second argument is optional and can be passed in as a boolean which will let you choose to interpret versions or ranges loosely | $semverValidRange('<=1.1.1 || >= 1.1.1') |
Shared | Core | $semverOutside() | $semverOutside(string, string, string, boolean?) | Return true if the version is outside the bounds of the range in either the high or low direction. The hilo argument must be either the string '>' or '<'. (This is the function called by gtr and ltr.). The fourth argument is optional and can be passed in as a boolean which will let you choose to interpret versions or ranges loosely | $semverOutside('1.3.2', '<= 2.1.2', '<') |
Shared | Core | $semverGtr() | $semverGtr(string, string, boolean?) | Return true if version is greater than all the versions possible in the range. The third argument is optional and can be passed in as a boolean which will let you choose to interpret versions or ranges loosely | $semverGtr('1.1.1', '<=1.0.0') |
Shared | Core | $semverLtr() | $semverLtr(string, string, boolean?) | Return true if version is less than all the versions possible in the range. The third argument is optional and can be passed in as a boolean which will let you choose to interpret versions or ranges loosely | $semverLtr('1.1.1', '<=1.0.0') |
Shared | Core | $semverIntersects() | $semverIntersects(string, string, boolean?) | Return true if any of the ranges comparators intersect. The third argument is optional and can be passed in as a boolean which will let you choose to interpret versions or ranges loosely | $semverIntersects('>= 1.0.0', '<=1.2.3') |
Shared | Core | $semverSimplifyRange() | $semverSimplifyRange(array<string>, string) | Return a "simplified" range that matches the same items in versions list as the range specified. Note that it does not guarantee that it would match the same versions in all cases, only for the set of versions provided. This is useful when generating ranges by joining together multiple versions with || programmatically, to provide the user with something a bit more ergonomic. If the provided range is shorter in string-length than the generated range, then that is returned. | $semverSimplifyRange(['1.1.3', '3.2.3'], '>= 2.1.1') |
Shared | Core | $semverRangeSubset() | $semverRangeSubset(string, string, string?) | Return true if the subRange range is entirely contained by the superRange range. The fourth argument is optional and can be passed in as a boolean which will let you choose to interpret versions or ranges loosely | $semverRangeSubset('<1.1.1', '>3.2.1') |
Shared | Core | $validateSchema() | $validateSchema(any JSON type) | Takes a JSON object and validates that it is a JSON schema object. | $validateSchema({"id":1,"label":2}) |
Shared | Core | $validateJson() | $validateJson(any JSON type, json schema) | Takes JSON data and a schema and validates that the JSON matches the schema, throwing any validation errors. | $validateJson([1, 2, 3, 4, 5],{"type": "array", "items": {"type": "number"}}) |
Shared | Core | $isValidJson() | $isValidJson(any JSON type, json schema) | Takes JSON data and a schema and returns a boolean indicating if the data matches the schema. | $isValidJson([1, 2, 3, 4, 5],{"type": "array","items": {"type": "number"}}) |
Shared | Core | $mapParallel() | $mapParallel(object, function, number?) | Takes an array and a mapping function, returns a new array where the values have been replaced with the output of the mapping function. The default degree of parallelism is 8. | $mapParallel([{ "id": 1, "name": "test 1" }, { "id": 1, "name": "test 2" }], function ($v) { $v.name }, 2); |
Shared | Core | $mapValuesParallel() | $mapValuesParallel(object, function, number?) | Takes an object and a mapping function, returns a new object where the values have been replaced with the output of the mapping function. The default degree of parallelism is 8. | $mapValuesParallel({ "hello": "John", "goodbye": "Joan" }, function ($v) { $v = "John" ? "Joan" : $v }, 2); |
Shared | Core | $filterParallel() | $filterParallel(array, function, number?) | Takes an array and a predicate function, returns an array. The resulting array contains all the values for which the predicate returns true. The default degree of parallelism is 8. | $filterParallel([{ "id": 1, "name": "test 1" }, { "id": 1, "name": "test 2" }], function ($v) { $v.name = "test 1" }, 2); |
Shared | Core | $groupByParallel() | $groupByParallel(array, function, number?) | Takes an array and a key function, returns an object. All values with the same key are added to an array property in the object named based on the key. The default degree of parallelism is 8. | $groupByParallel([{ "id": 1, "name": "test 1" }, { "id": 1, "name": "test 2" }], function ($v) { $v.id }, 2); |
Shared | Core | $timesParallel() | $timesParallel(number, function, number?) | Executes a function N number of times, in parallel. Results are collected as an array. This is essentially a functional version of a for loop. The default degree of parallelism is 8. | $timesParallel(5, function ($n) { $n }, 2); |
Shared | Core | $flattenObject() | $flattenObject(object,options) | Flattens the object - it'll return an object one level deep, regardless of how nested the original object was. | $flattenObject({ |
Shared | Core | $unflattenObject() | $unflattenObject(object,options) | Unflattens an object which is flattend. | $unflattenObject({ |
Shared | Core | $objectDiff() | $objectDiff(object, object, options) | Compares two objects and returns the differences. | $objectDiff( |
Shared | Core | $urlJoin() | $urlJoin(array) | Join an array of url paths using a url join. The joined url will remove any duplicate / in the path and add them if they are not provided. | ", "a", "/b/cd", "?foo=123"]) |
Shared | Core | $startsWith() | $startsWith(string, pattern) | Checks to see if string starts with pattern | $startsWith('foobar', 'foo') |
Shared | Core | $endsWith() | $endsWith(string, pattern) | Checks to see string ends with pattern | $endsWith('foobar', 'bar') |
Shared | Core | $removeLeadingValues() | $removeLeadingValues(string, pattern) | Removes specified leading values from string. This will loop until string no longer begins with pattern | $removeLeadingValues('foobar', 'foo') |
Shared | Core | $replaceLeadingValues() | $replaceLeadingValues(string, pattern, replacement) | String is what is being modified. If string begins with pattern, it will be replaced by replacement. If pattern appears multiple times in a row, it will be replaced for each time it appears. | $replaceLeadingValues('foobar', 'foo', 'replace') |
Shared | Core | $jsonToJsonSchema() | $jsonToJsonSchema(json, options) | Converts a JSON object into JSON Schema, lists which fields are required and finds most compatible type for array. | $jsonToJsonSchema({"test" : [1,"str",3]}, {"required": true, "arrays": {"mode": "all"}}) |
Shared | Core | $jsonToJsonSchema() | $jsonToJsonSchema(json, options) | Converts a JSON object into JSON Schema and classifies array type by first element. | $jsonToJsonSchema({"test" : [1,"str",3]}, {"required": false, "arrays": {"mode": "first"}}) |
Shared | Core | $jsonToJsonSchema() | $jsonToJsonSchema(json, options) | Converts a JSON object into JSON Schema and lists type of each element in an array. | $jsonToJsonSchema({"test" : [1,"str",3]}, {"required": false, "arrays": {"mode": "tuple"}}) |
Shared | Core | $jsonToJsonSchema() | $jsonToJsonSchema(json, options) | Converts a JSON object into JSON Schema if all elements in arrays to be the same type. If not, an error is thrown. | $jsonToJsonSchema({"test" : [1,2,3]}, {"required": false, "arrays": {"mode": "uniform"}}}) |
Shared | Core | $all() | $all(array, function) | Returns true if all elements of the array satisfy the predicate function and false otherwise. | $all([3, 5, 7, 9], function($el) { $el % 2 = 1 }) |
Shared | Core | $any() | $any(array, function) | Returns true if any element of the array satisfies the predicate function and false otherwise. | $any([2, 3, 5, 7], function($el) { $el % 2 = 0 }) |
Shared | Core | $jsonToMarkdown() | $jsonToMarkdown(array<object>) | $jsonToMarkdown([{"h1":"John"} , {"blockquote":30} , {"h3":"New York"}]) | |
Shared | EDI | $parseX12() | $parseX12(string) | Converts an X12 EDI string into a JSON object. | $parseX12("ISA*00* *00* *ZZ*EMEDNYBAT *ZZ*ETIN...") |
Shared | EDI | $formatX12() | $formatX12([string]) | Converts a parsed X12 EDI array of objects into a formatted JSON object. Includes parseX12 binding. | $formatX12($parseX12("ISA*00* *00* *ZZ*EMEDNYBAT *ZZ*ETIN...")) |
Shared | Encryption | $encryptHmac() | $encryptHmac(algorithm, key, string, encoding?) | Returns a digest encrypted with the key based on the supplied algorithm in the supplied (optional, default base64) encoding. Algorithm can be any supported OpenSSL method. | $encryptHmac('sha256', 'foo', 'bar', 'base64') |
Shared | Encryption | $hash() | hash(algorithm, string, encoding?) | Returns a hash of the string based on the algorithm provided in the supplied (optional, default base64) encoding. Algorithm can be any supported OpenSSL method. | $hash('sha256', 'foobar', 'base64') |
Shared | Joins | $crossJoin() | $crossJoin(array, array, string, object?) | Cross-joins the left and right arrays. Every value in the left array will be joined to every value in the right array. | $crossJoin( left, right, 'joinedKey', { 'grouped': false } ) |
Shared | Joins | $innerJoin() | $innerJoin(array, array, string | array<string> | function, string | array<string> | function, string, object?) | Performs an inner join between the left and right arrays. The accessors can be either a path string (separated by periods), an array of path elements, or a function. Only values from the left side with a match on the right side will be returned. | $innerJoin( left, right, 'leftKey', 'rightKey', 'joinedKey', { 'grouped': false } ) |
Shared | Joins | $leftAntiJoin() | $leftAntiJoin(array, array, string | array<string> | function, string | array<string> | function) | Performs an anti semi-join against the left array. Only values from the left side without a match on the right side will be kept. | $leftAntiJoin( left, right, 'leftKey', 'rightKey') |
Shared | Joins | $leftOuterJoin() | $leftOuterJoin(array, array, string | array<string> | function, string | array<string> | function, string, object?) | Performs an outer join between the left and right arrays. The accessors can be either a path string (separated by periods), an array of path elements, or a function. All values from the left side will be returned, regardless of whether there is a match on the right side. | $leftOuterJoin( left, right, 'leftKey', 'rightKey', 'joinedKey', { 'grouped': false } ) |
Shared | Joins | $leftSemiJoin() | $leftSemiJoin(array, array, string | array<string> | function, string | array<string> | function) | Performs a semi-join against the left array. Only values from the left side with a match on the right side will be kept. | $leftSemiJoin( left, right, 'leftKey', 'rightKey' ) |
Shared | Moment | $moment() | $moment(string?, string?, string? | boolean?, boolean?) | Returns a moment.js instance of the given date string. | $moment("01/01/2019 09:00:00AM", "MM/DD/YYYY hh:mm:ssA" ) |
Shared | Moment | $moment() | $moment(string?, string?, string? | boolean?, boolean?) | Returns begining of day | $moment().subtract(1, 'days').startOf('day') |
Shared | Moment | $moment() | $moment(string?, string?, string? | boolean?, boolean?) | Returns end of day | $moment().subtract(1, 'days').endOf('day') |
Shared | Moment | $moment() | $moment(string?, string?, string? | boolean?, boolean?) | Returns start of Last Month | $moment().subtract(1, 'month').startOf('month') |
Shared | Moment | $moment() | $moment(string?, string?, string? | boolean?, boolean?) | Returns end of Last Month | $moment().subtract(1, 'month').endOf('month') |
Shared | Moment | $moment() | $moment(string?, string?, string? | boolean?, boolean?) | Returns start of Current Month | $moment().startOf('month') |
Shared | Moment | $moment() | $moment(string?, string?, string? | boolean?, boolean?) | Returns end of Current Month | $moment().endOf('month') |
Shared | Moment | $momentTz() | $momentTz(string?, string?, string?) | Returns a moment.js instance of the given date string, with the timezone assumed to be the given timezone. | $momentTz( "01/01/2019 09:00:00AM", "MM/DD/YYYY hh:mm:ssA", "America/Detroit" ) |
Shared | Moment | $momentTzTimezones() | $momentTzTimeZones() | Returns Moment Timezones | $momentTzTimezones() |
Shared | Moment | $momentTzGuess() | $momentTzGuess(boolean?) | Moment Tz guess uses the Internationalization API (Intl.DateTimeFormat().resolvedOptions().timeZone) in supported browsers to determine the user's time zone. You can optionally pass a boolean that will ignore cached values. This function will only work correctly when ran through a frontend transform. When this function is ran in the backend it will return UTC. | $momentTzGuess() |
Shared | Moment | $momentMax(array, boolean?) | Moment Max receives an array of $moment objects or moment compatible values and returns the maximum (most distant future) value. You can optionally pass a boolean that will ignore invalid dates. | $momentMax([$moment("2030-12-15").subtract(1, "days"), $moment("2030-12-15").add(10, "days"), $moment("2030-12-15").subtract(5, "days")]) | |
Shared | Moment | $momentMin(array, boolean?) | Moment Min receives an array of $moment objects or moment compatible values and returns the minimum (most distant past) value. You can optionally pass a boolean that will ignore invalid dates. | $momentMin([$moment("2030-12-15").subtract(1, "days"), $moment("2030-12-15").add(10, "days"), $moment("2030-12-15").subtract(5, "days")]) | |
Shared | XML | $jsonToXml() | $jsonToXml(object | array<object>,object?) | Returns an XML string representation of the given JSON object or array. For options go to | $jsonToXml({ "parent": { "child": [1,2,3] } }, {"headless": false}) |
Shared | XML | $xmlToJson() | $xmlToJson(string,object?) | Returns a JSON representation of the given XML string. For options go to | $xmlToJson('<?xml version="1.0" encoding="UTF-8" standalone="yes"?> |
Shared | JSONata | $string(arg) | Casts the arg parameter to a string using the following casting rules | $string(arg) | |
Shared | JSONata | $length(str) | Returns the number of characters in the string str. | $length("Hello World") | |
Shared | JSONata | $substring(str, start[, length]) | Returns a string containing the characters in the first parameter str starting at position start (zero-offset). | $substring("Hello World", 3) | |
Shared | JSONata | $substringBefore(str, chars) | Returns the substring before the first occurrence of the character sequence chars in str. | $substringBefore("Hello World", " ") | |
Shared | JSONata | $substringAfter(str, chars) | Returns the substring after the first occurrence of the character sequence chars in str. | $substringAfter("Hello World", " ") | |
Shared | JSONata | $uppercase(str) | Returns a string with all the characters of str converted to uppercase. | $uppercase("Hello World") | |
Shared | JSONata | $lowercase(str) | Returns a string with all the characters of str converted to lowercase. | ||
Shared | JSONata | $trim(str) |
| Normalizes and trims all tabs, carriage returns, line feeds, contiguous whitespaces, Trailing and leading whitespaces characters in str | $trim(" Hello |
Shared | JSONata | $pad(str, width [, char]) | Returns a copy of the string str with extra padding, if necessary, so that its total number of characters is at least the absolute value of the width parameter. | $pad("foo", -5, "#") | |
Shared | JSONata | $contains(str, pattern) | Returns true if str is matched by pattern, otherwise it returns false. | $contains("abracadabra", "bra") | |
Shared | JSONata | $split(str, separator [, limit]) | Splits the str parameter into an array of substrings. | $split("so many words", " ") | |
Shared | JSONata | $join(array[, separator]) | Joins an array of component strings into a single concatenated string with each component string separated by the optional separator parameter. | $join(['a','b','c']) | |
Shared | JSONata | $match(str, pattern [, limit]) | Applies the str string to the pattern regular expression and returns an array of objects, with each object containing information about each occurrence of a match withing str. | $match("ababbabbcc",/a(b+)/) | |
Shared | JSONata | $replace(str, pattern, replacement [, limit]) | Finds occurrences of pattern within str and replaces them with replacement. | $replace("John Smith and John Jones", "John", "Mr") | |
Shared | JSONata | $eval(expr [, context]) | Parses and evaluates the string expr which contains literal JSON or a JSONata expression using the current context as the context for evaluation. | $eval("[1,2,3]") | |
Shared | JSONata | $base64encode(str) | Converts an ASCII string to a base 64 representation. | $base64encode("myuser:mypass") | |
Shared | JSONata | $base64decode(str) | Converts base 64 encoded bytes to a string, using a UTF-8 Unicode codepage. | $base64decode("bXl1c2VyOm15cGFzcw==") | |
Shared | JSONata | $number(arg) | Casts the arg parameter to a number. | $number("5") | |
Shared | JSONata | $abs(number) | Returns the absolute value of the number parameter, i.e. if the number is negative, it returns the positive value. | $abs(-5) | |
Shared | JSONata | $floor(number) | Returns the value of number rounded down to the nearest integer that is smaller or equal to number. | $floor(5.8) | |
Shared | JSONata | $ceil(number) | Returns the value of number rounded up to the nearest integer that is greater than or equal to number. | $ceil(5.3) | |
Shared | JSONata | $round(number [, precision]) | Returns the value of the number parameter rounded to the number of decimal places specified by the optional precision parameter. | $round(123.456, 2) | |
Shared | JSONata | $power(base, exponent) | Returns the value of base raised to the power of exponent (baseexponent). | $power(2, 8) | |
Shared | JSONata | $sqrt(number) | Returns the square root of the value of the number parameter. | $sqrt(4) | |
Shared | JSONata | $random() | Returns a pseudo random number greater than or equal to zero and less than one (0 ≤ n < 1) | $random() | |
Shared | JSONata | $formatNumber(number, picture [, options]) | Casts the number to a string and formats it to a decimal representation as specified by the picture string. | $formatNumber(12345.6, "#,###.00") | |
Shared | JSONata | $formatBase(number [, radix]) | Casts the number to a string and formats it to an integer represented in the number base specified by the radix argument. | $formatBase(100, 2) | |
Shared | JSONata | $formatInteger(number, picture) | Casts the number to a string and formats it to an integer representation as specified by the picture string. | $formatInteger(2789, "w") /*A,a,i,I,w,W,Ww...*/ | |
Shared | JSONata | $parseInteger(string, picture) | Parses the contents of the string parameter to an integer (as a JSON number) using the format specified by the picture string. | $parseInteger("twelve thousand, four hundred and seventy-six", "w") /*A,a,i,I,w,W,Ww...*/ | |
Shared | JSONata | $sum(array) | Returns the arithmetic sum of an array of numbers. It is an error if the input array contains an item which isn't a number. | $sum([5,1,3,7,4]) | |
Shared | JSONata | $max(array) | Returns the maximum number in an array of numbers. It is an error if the input array contains an item which isn't a number. | $max([5,1,3,7,4]) | |
Shared | JSONata | $min(array) | Returns the minimum number in an array of numbers. It is an error if the input array contains an item which isn't a number. | $min([5,1,3,7,4]) | |
Shared | JSONata | $average(array) | Returns the mean value of an array of numbers. It is an error if the input array contains an item which isn't a number. | $average([5,1,3,7,4]) | |
Shared | JSONata | $boolean(arg) | Casts the argument to a Boolean. | $boolean(0) | |
Shared | JSONata | $not(arg) |
| Returns Boolean NOT on the argument. arg is first cast to a boolean. | $not(true) |
Shared | JSONata | $exists(arg) | Returns Boolean true if the arg expression evaluates to a value, or false if the expression does not match anything (e.g. a path to a non-existent field reference). | $exists(SomeObject) | |
Shared | JSONata | $count(array) | Returns the number of items in the array parameter. | $count([1,2,3,1]) | |
Shared | JSONata | $append(array1, array2) | Returns and array containing the values in array1 followed by the values in array2. | $append([1,2,3], [4,5,6]) | |
Shared | JSONata | $sort(array [, function(left, right)]) | Returns an array containing all the values in the array parameter, but sorted into order. | $sort(Account.Order.Product, function($l, $r) { | |
Shared | JSONata | $reverse(array) | Returns an array containing all the values from the array parameter, but in reverse order. | $reverse(["Hello", "World"]) | |
Shared | JSONata | $shuffle(array) | Returns an array containing all the values from the array parameter, but shuffled into random order. | $shuffle([1..9]) | |
Shared | JSONata | $zip(array1, ...) | Returns a convolved (zipped) array containing grouped arrays of values from the array1 ... arrayN arguments from index 0, 1, 2, etc. | $zip([1,2,3],[4,5],[7,8,9]) | |
Shared | JSONata | Array slice | Returns a portion of the specified array. | array[[0..$count(array)]] | |
Shared | JSONata | $keys(object) | Returns an array containing the keys in the object. If the argument is an array of objects, then the array returned contains a de-duplicated list of all the keys in all of the objects. | $keys(object) | |
Shared | JSONata | $lookup(object, key) | Returns the value associated with key in object. If the first argument is an array of objects, then all of the objects in the array are searched, and the values associated with all occurrences of key are returned. | $lookup(object, key) | |
Shared | JSONata | $spread(object) | Splits an object containing key/value pairs into an array of objects, each of which has a single key/value pair from the input object. | $spread(object) | |
Shared | JSONata | $merge(array<object>) | Merges an array of objects into a single object containing all the key/value pairs from each of the objects in the input array. | $merge(array<object>) | |
Shared | JSONata | $each(object, function) | Returns an array containing the values return by the function when applied to each key/value pair in the object. | $each(Address, function($v, $k) {$k & ": " & $v}) | |
Shared | JSONata | $now([picture [, timezone]]) | Generates a UTC timestamp in ISO 8601 compatible format and returns it as a string. All invocations of $now() within an evaluation of an expression will all return the same timestamp value. | $now() | |
Shared | JSONata | $millis() |
| Returns the number of milliseconds since the Unix Epoch (1 January, 1970 UTC) as a number. All invocations of $millis() within an evaluation of an expression will all return the same value. | $millis() |
Shared | JSONata | $fromMillis(number [, picture [, timezone]]) | Convert the number representing milliseconds since the Unix Epoch (1 January, 1970 UTC) to a formatted string representation of the timestamp as specified by the picture string. | $fromMillis(1510067557121) | |
Shared | JSONata | $toMillis(timestamp [, picture]) | Convert a timestamp string to the number of milliseconds since the Unix Epoch (1 January, 1970 UTC) as a number. | $toMillis("2017-11-07T15:07:54.972Z") | |
Shared | JSONata | $map(array, function(value [, index [, array]]) | Returns an array containing the results of applying the function parameter to each value in the array parameter. | $map(Email.address, function($v, $i, $a) { | |
Shared | JSONata | $filter(array, function(value [, index [, array]])) | Returns an array containing only the values in the array parameter that satisfy the function predicate (i.e. function returns Boolean true when passed the value). | $filter(Account.Order.Product, function($v, $i, $a) { | |
Shared | JSONata | $reduce(array, function(i, j) [, init]) | Returns an aggregated value derived from applying the function parameter successively to each value in array in combination with the result of the previous application of the function. | $product := function($i, $j){$i * $j}; | |
Shared | JSONata | $sift(object, function(value [, key [, object]])) | Returns an object that contains only the key/value pairs from the object parameter that satisfy the predicate function passed in as the second parameter. | Account.Order.Product.$sift(function($v, $k) {$k ~> /^Product/}) | |
Shared | Other | $log(message,meta,level) | Logs a statement with a 'message' of a 'level' and optionally a 'meta' object. The level argument is optional; valid values include ('error','warn','info','verbose','debug','silly'); invalid values default to 'info'. This object is stored as a JSONB blob within postgres. Check your console log. | $log('some message',{'some object':{'some key':'some value'}},'info') | |
Shared | Other | $getCalendar(object) | Returns MFGx Calendar and events by the id | $getCalendar({"id":id}) | |
Shared | Other | $getCalendar(object) | Returns MFGx Calendar and events by the calendars name | $getCalendar({"name":calendarName}) | |
Shared | Other | $query(object) | Returns relevant information to the GraphQL query and variables provided | $query({"statement":'',"variables":{}}) | |
Shared | Other | $document(object[, options]) | Generates and returns an MFGx document based on the id and payload in a base64 encoded PDF string | $document({ | |
Shared | Other | $mutate(object) | Returns relevant information to the GraphQL mutation and variables provided | $mutate({"statement":'',"variables":{}}) | |
Shared | Other | $integrate(object) | Executes the request provided and returns revelant information | $integrate({ | |
Shared | Other | $integrate(array) | Executes the request provided and returns revelant information | $integrate([ | |
Shared | Other | $executeFlow(string,object) | Executes a request/response flow based on the id and payload and returns the value of the response node. | $executeFlow(flowId,payload) | |
Shared | Other | $executeTransform(string,object) | Executes a saved transform based on the id of the transform. Returning the evaluation of the response. | $executeTransform(transformId,payload) | |
Shared | Other | $executeDeviceGatewayFunction(object) | Executes a device gateway function. | $executeDeviceGatewayFunction({ | |
Shared | Other | $executeDeviceFunction(object) | Executes a device function. | $executeDeviceFunction({ | |
Shared | Other | $executeDeviceFunction(object) | Executes a device function. | $executeDeviceFunction({ |