Skip to main content

IMPORTANT - Product End of Life Statement - IMPORTANT

Request RE, Survey, and Calendar 1.5 Support Ending December 31, 2020
Contact Kinetic Data Support with Questions
Kinetic Community

Utility JSON to CSV

This handler converts a JSON string into a CSV string.

Downloads

By downloading this file, you acknowledge that you agree to our Terms of Service

utility_json_to_csv_v2.zip

Detailed Description

This handler makes some assumptions about the format of the JSON structure. It expects an array of objects to be the value of the root of the JSON object. In the example below the root object has a label of "table", this label is arbitrary and unused by the handler. This handler also expects the array of objects to contain only simple objects, not nested arrays or nested objects.

Examples

Below is an example of a JSON input string and the corresponding CSV output generated by this handler.

JSON Input { "table" : [ { "a" : "animal", "b" : "boat", "c" : "car" }, { "c" : "cat", "d" : "dog" }, { "e" : "eel" } ] }

CSV Output

a,b,c,d,e

animal,boat,car,,

,,cat,dog,

,,,,eel

Parameters

Name Description
JSON The JSON String to be converted to CSV

Sample Configuration

Parameter Example Configuration
JSON {"table": [{"a": "1", "b": "2"},{"b": "2", "c": "3"}]}

Results

Name Description
CSV A CSV String that was converted from the given JSON

Change Log

Version Date Description
2.1 2018-07-02 * Updated dependencies.rb to skip loading JSON in Task 4 because it is already loaded by default
2 2016-09-27 * Updated for new version of CSV in Task 4
1 2010-05-24 * Initial version. See README for details.