Create a variable of JSON Expression type

  1. Open the process in which to create a variable of JSON Expression type.
  2. On the Modeling bar, click Variables.

    The Variables page appears.

  3. On the Type list, select JSON Expression.
  4. Enter a Name and ID for the variable.
  5. Click Configure.

    The JSON Expression Variable page appears.

  6. To specify the source to use in the JSON variable, consume a string variable in the Source JSON box.
    For example, use the following string variable: { "person" : { "name" : "John" , "age" : 25 , "city" : "New York" }, "company" : "kofax" }
    Note You can set the source variable of JSON Expression as output to an activity. You cannot delete a source JSON variable if it is in use in JSON Expression variable.
  7. In the Expression Text box, enter the JSON string, such as $.person.name, or $['person']['age'].
    At runtime, the data is retrieved as John or 25 respectively.
  8. On the Return Type of Extracted Data list, select the return type of the JSON expression. TotalAgility supports the following variable types:
    • Boolean

    • Byte

    • Currency

    • Date

    • Decimal

    • Double

    • Float

    • Long

    • Short

    • String

  9. Click OK.