JS SDK: Examples
Examples of Array Handling
Example 1: Finding Intersection of Arrays
In this example, we will match candidates (structured as 'Cand') with job offers (structured as 'Jobs') by considering the intersection of skills, represented as arrays such as finance, management, and programming. The candidate's skills are stored in 'cand_skills,' while the required skills (functions) for the job are stored in 'job_functions.' The matching result will be saved in the 'Job' object, specifically in the 'candidate_ids' field.
Here we use the following functions:
Standard JS method .split(",")
Standard JS method .forEach()
Content within the JS SDK Step:
Example 2: Composing JSON with Custom Property Names
While the JSON step is useful, it doesn't support custom property names. Here's how to work around that limitation.
For instance, if you have structures for 'Authors' and 'Books' and want to compose JSON like this:
We can do that with the following JS SDK code:
Last updated