parse (string)
  • Dark
    Light
  • PDF

parse (string)

  • Dark
    Light
  • PDF

parse Task Purpose

The parse task is used to parse a JSON string (written in JSON format) and return a JavaScript (JS) object. If a malformed JSON string is passed, an exception is thrown. This task is very useful when dealing with JSON-formatted content.

Potential Use Case

Some systems will return an XML payload which has stringified json. The parse task will reform the string into a working JSON object so that the individual components of data within the JS object can be accessed.

Properties

Input and output properties are shown below.

Input Type Description
text String Required. The JSON string to parse. If the string is malformed (not a valid JSON format), an exception is thrown.


Output Type Description
textObject Object The JSON object that returns when the input text is parsed.

Examples

In the IAP examples shown below:

  • The text string to parse is statically set to {"firstName": "John", "lastName": "Smith", "age": 22, "state": "California"}.

    parse-01

  • The outgoing textObject variable would be:

    {
    "firstName": "John",
    "lastName": "Smith",
    "age": 22,
    "state": "California"
    }
    

    parse-02


Changing your password will log you out immediately. Use the new password to log back in.
First name must have atleast 2 characters. Numbers and special characters are not allowed.
Last name must have atleast 1 characters. Numbers and special characters are not allowed.
Enter a valid email
Enter a valid password
Your profile has been successfully updated.