The JSON Parse tool separates Java Script Object Notation text into a table schema for the purpose of downstream processing. It can be built back up into usable JSON format by feeding the output into the JSON Build tool.
JSON Field: Use the drop down list to select the field that holds Java Script Object Notation text. The field must be formatted properly, meaning it must contain valid JSON with all the text for a record in a single cell. See the example below.
Example Input:
JSON Field |
{ "firstName": "John", "lastName": "Smith", "age": 25, "address": { "streetAddress": "21 2nd Street", "city": "New York", "state": "NY", "postalCode": "10021" }, "phoneNumber": [ { "type": "home", "number": "212 555-1234" }, { "type": "fax", "number": "646 555-4567" } ] } |
Include in Output: When checked, the JSON field specified will be included in the data stream coming out of the tool.
Choose how the JSON gets parsed. Choices include:
Example Output:
JSON_ValueString |
|
firstName |
John |
lastName |
Smith |
age |
25 |
address.streetAddress |
21 2nd Street |
address.city |
New York |
address.state |
NY |
address.postalCode |
10021 |
phoneNumber.0.type |
home |
phoneNumber.0.number |
212-555-1234 |
phoneNumber.1.type |
fax |
phoneNumber.1.number |
646-555-4567 |
Looking at the input example above, the following data comes out of the tool:
Example Output:
JSON_Name |
JSON_ValueString |
JSON_ValueInt |
JSON_ValueFloat |
JSON_ValueBool |
firstName |
John |
[Null] |
[Null] |
[Null] |
lastName |
Smith |
[Null] |
[Null] |
[Null] |
age |
[Null] |
25 |
[Null] |
[Null] |
address.streetAddress |
21 2nd Street |
[Null] |
[Null] |
[Null] |
address.city |
New York |
[Null] |
[Null] |
[Null] |
address.state |
NY |
[Null] |
[Null] |
[Null] |
address.postalCode |
10021 |
[Null] |
[Null] |
[Null] |
phoneNumber.0.type |
home |
[Null] |
[Null] |
[Null] |
phoneNumber.0.number |
212-555-1234 |
[Null] |
[Null] |
[Null] |
phoneNumber.1.type |
fax |
[Null] |
[Null] |
[Null] |
phoneNumber.1.number |
646-555-4567 |
[Null] |
[Null] |
[Null] |
©2017 Alteryx, Inc., all rights reserved. Allocate®, Alteryx®, Guzzler®, and Solocast® are registered trademarks of Alteryx, Inc.