• v7.2.0
    • v7.11.0 (latest)
    • v7.10.0
    • v7.9.0
    • v7.8.0
    • v7.7.0
    • v7.6.0
    • v7.5.0
    • v7.3.0
    • v7.2.0
    • v7.1.1
    • v7.1.0
    • v7.0.8
  • Services & Support
  • Devo.com
  • Contact
    • Contact Us
    • Request a Demo
    • Partner Inquiry
  • Log In
    • USA Devo
    • EU Devo
PREVIOUS
Autoparser
NEXT
Advanced data operations

Searching data / Working in the search window / Setting up a data table / Autoparser / Autoparse a JSON object

Download as PDF

Autoparse a JSON object

The autoparser is able to detect JSON objects in unparsed events and extract individual key/value pairs in different columns if needed.

To do it, access the unparsed my.app / my.upload table that contains the JSON objects and define the autoparser by following the steps in Autoparser. The value in the Type column will be automatically set to JSON object for the detected JSON objects. Click the dropdown selector to choose one of the available types:

  • JSON object - This is the default option, and transforms each JSON object into a json type value.
  • JSON split - Split the JSON object into different values, indicating the required depth level. The values in the list correspond to the available depth levels in the JSON objects. Learn more about this in the section below.
  • String - This option transforms each JSON object into a string type value.

Split JSON objects

Choose the JSON split option in the Type column to divide your JSON object into different values. Once the option is selected, a second dropdown box appears to indicate the required depth level you want to apply.

After applying the autoparser, you will always get a column that shows the whole JSON objects (in json data type), whose name is the one you give in the Name field during the autoparsing creation process. Then, you will get as many additional columns as distinct keys you have in all your JSON objects, according to the given depth level. Not available levels in a specific JSON will be assigned null values. Learn more in the example below.

The order of the columns including the different JSON levels is random and may not follow the order of the JSON object.

Example

Let's see an example. We sent two events to Devo, each of them containing one of the following JSON objects:

{ 
"splitInt":1, 
"childObj": 
    { 
    "childKey":"childVal", 
    "childKey2":"childVal2", 
    "childKey3":"childVal3", 
    "childkey4": 
        { 
        "newlevel1":1, 
        "newlevel2":2 
        } 
    } 
}

and

{ 
"S1":
    {
    "S2": 
        { 
        "S2_child":
            { 
            "int1": 4, 
            "int2": 5 
            } 
        } 
    } 
}

In the autoparser configuration, we named the JSON object myJSON, and set the Type to JSON split. 

Let's see what happens when we select different depth levels:

  • If we select depth level 1, we will get the following columns (each column corresponds to a column in our Devo table):
myJSONmyJSON_splitIntmyJSON_childObjmyJSON_S1
This cell will show the whole JSON object1{"childKey":"childVal","childKey2":"childVal2","childKey3":"childVal3","childkey4":{"newlevel1":1,"newlevel2":2}}null
This cell will show the whole JSON objectnullnull{"S2":{"S2_child":{"int1":4,"int2":5}}}

  • And this will be the result if we select depth level 2:
myJSONmyJSON_splitIntmyJSON_childObj_childkeymyJSON_childObj_childkey2myJSON_childObj_childkey3myJSON_childObj_childkey4myJSON_S1_S2
This cell will show the whole JSON object1childValchildVal2childVal3{"newlevel1":1,"newlevel2":2}null
This cell will show the whole JSON objectnullnullnullnullnull{"S2_child":{"int1":4,"int2":5}}}

Download as PDF

PREVIOUS
Autoparser
NEXT
Advanced data operations

Export

See what Devo can do for you. Request a demo!
Discover what's new (Release notes)
  • v7.2.0
    • v7.11.0 (latest)
    • v7.10.0
    • v7.9.0
    • v7.8.0
    • v7.7.0
    • v7.6.0
    • v7.5.0
    • v7.3.0
    • v7.2.0
    • v7.1.1
    • v7.1.0
    • v7.0.8
  • Services & Support
  • Devo.com
  • Contact
    • Contact Us
    • Request a Demo
    • Partner Inquiry
  • Log In
    • USA Devo
    • EU Devo
  • +1 888 6830910 (USA)
  • +34 900 838 880 (Spain)
Copyright © 2019 Legal Terms Privacy Policy Cookies Policy

Powered by Confluence and Scroll Viewport