Scenario 1: Extracting JSON data from a file using JSONPath without setting a loop
node
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.
The JSON file Store.json contains information about a
department store and the content of the file is as follows:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
{"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.
Document get from Talend https://help.talend.com
Thank you for watching.
Subscribe
Login
0 Comments