If the source dataset contains multiple rows, they will be converted into an array of JSON objects where each object corresponds to one row. Example:

ID

Name

1

Apple

2

Orange

Result:

[
{
"ID":1,
"Name":"Apple"
},
{
"ID":2,
"Name":"Orange"
}
]

Mode "Array per column"

In this mode the source dataset is converted into a new dataset in which values of each column are rolled up into a JSON array. For instance the table from the example above would be converted into the following table:

ID

Name

[1,2]

[Apple,Orange]

Data type conversion

EasyMorph data types are converted to JSON types as follows:

EasyMorph

Example

JSON

Example

Text

ABC

string

“ABC”

Number

123.45

number

123.45

Number (formatted as date)

2020-Jan-10

date

2020-01-10T00:00:00Z

Boolean

TRUE

boolean

true

Empty

null

null

Error

#Division by zero

Fails to convert

Note that the action fails if the source dataset contains an error value.

Nesting JSON objects

EasyMorph automatically detects if a text value is already a JSON object or a JSON array. In this case, the text value is inserted verbatim, i.e. without wrapping in double quotes. This feature allows creating complex hierarchical JSON objects that nest other JSON objects. For instance converting the table below: