Scenario 1: Extracting JSON data from a file using JSONPath without setting a loop node

JSON

author
Talend Documentation Team
EnrichVersion
6.5
EnrichProdName
Talend Open Studio for Big Data
Talend Open Studio for Data Integration
Talend MDM Platform
Talend Real-Time Big Data Platform
Talend Data Services Platform
Talend Data Fabric
Talend Big Data
Talend Big Data Platform
Talend Data Integration
Talend Open Studio for ESB
Talend Data Management Platform
Talend Open Studio for MDM
Talend ESB
task
Data Governance > Third-party systems > File components (Integration) > JSON components
Design and Development > Third-party systems > File components (Integration) > JSON components
Data Quality and Preparation > Third-party systems > File components (Integration) > JSON components
EnrichPlatform
Talend Studio

This scenario describes a two-component Job that extracts data from the JSON file Store.json by specifying the complete JSON path for each node of interest and displays the flat data extracted on the console.

For more technologies supported by Talend, see Talend components.

The JSON file Store.json contains information about a department store and the content of the file is as follows:

{"store": {
    "name": "Sunshine Department Store",
    "address": "Wangfujing Street",
    "goods": {
        "book": [
            {
                "category": "Reference",
                "title": "Sayings of the Century",
                "author": "Nigel Rees",
                "price": 8.88
            },
            {
                "category": "Fiction",
                "title": "Sword of Honour",
                "author": "Evelyn Waugh",
                "price": 12.66
            }
        ],
        "bicycle": {
            "type": "GIANT OCR2600",
            "color": "White",
            "price": 276
        }
    }
}}

In the following example, we will extract the store name, the store address, and the bicycle information from this file.