How to parse JSON file in a discovery pattern
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-20-2018 01:21 AM
How do I parse a JSON file with a "Parse file" operation? I cannot find any example on docs site.
Example:
{
"stuff": {
"onetype": [
{"id":1,"name":"John Doe"},
{"id":2,"name":"Don Joeh"}
],
"othertype": {"id":2,"company":"ACME"}
},
"otherstuff": {
"thing": [[1,42],[2,2]]
}
}
- Labels:
-
Discovery
-
Service Mapping
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-20-2018 04:18 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-20-2018 06:14 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-20-2018 12:48 PM
That looks about right. With most of these parsing strategies if you highlight the text you want it will figure out the advanced options for you. Either way it looks good.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 weeks ago
I find this helpful but a bit complete. How do I check the value of a tag and then fetch the value of something below it. for example I need the version of the item where name is 'hadoop-httfs'. How will I achieve that?
{
"components": [{
"name": "hadoop",
"pkg_release": "82588920",
"pkg_version": "3.1.1",
"version": "3.1.1.7"
}, {
"name": "cpx",
"pkg_release": "82588920",
"pkg_version": "1.0",
"version": "1.0"
}, {
"name": "hadoop-httpfs",
"pkg_release": "82588920",
"pkg_version": "3.1.1",
"version": "3.1."
}, {
"name": "cloudera-opdb-replication",
"pkg_release": "82588920",
"pkg_version": "1.0.",
"version": "1.0"
}, {
"name": "hadoop-mapreduce",
"pkg_release": "82588920",
"pkg_version": "3.1.1.",
"version": "3.1"
}, {
"name": "hadoop-yarn",
"pkg_release": "82588920",
"pkg_version": "3.1.1",
"version": "3.1"
}, {
"name": "sqoop",
"pkg_release": "82588920",
"pkg_version": "1.4.7.7.1",
"version": "1.4"
}
],
}