To json (jsonparse)
Converts a field of string data type to json data type. The json data type is required as an input argument for the jqeval string operation.
How does it work in the search window?
Select Create column in the search window toolbar, then select the To json operation. You need to specify one argument:
|String to convert (mandatory)||string|
The data type of the values in the new column is json.
We have uploaded this CSV file that contains a column of JSON objects containing contact information. When the file was uploaded, the message column containing the JSON objects was recognized as a string. We need to change the data type to json so that we can we can use the Jq evaluation (jqeval) operation to extract individual contact details into their own columns.
- String to convert - message column
After applying the operation, we can see that the new messageJson column has been generated with the json data type.
How does it work in LINQ?
Use the operator
as... and add the operation syntax to create the new column. This is the syntax for the To json operation:
The LINQ query corresponding to the above example is:
from my.upload.json.contacts select jsonparse(message) as messageJson