
Anonymous
Not applicable
2016-06-21
09:04 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Getting JSON fields from JSON array with XPATH
My JSON looks like this
How can I get fields out from JSON with XPATH ? The problem is that the number of JSON elements varies. Sometimes is 3, Sometimes is 4 and Sometimes is 2?
So JSON sometimes look like this:
My job looks like this:
tFileInputJSON -- tLogRow
I would like my tLogRow to look like this:
.--------------------.
| tLogRow_2 |
|=------------------=|
|Name |
|=------------------=|
|Mike|
'--------------------'
|Linda|
'--------------------'
|Danny|
'--------------------'
{
"ORDER": ,
"HELP_NR": "554-5774"
}
How can I get fields out from JSON with XPATH ? The problem is that the number of JSON elements varies. Sometimes is 3, Sometimes is 4 and Sometimes is 2?
So JSON sometimes look like this:
{
"ORDER": ,
"HELP_NR": "554-5774"
}
My job looks like this:
tFileInputJSON -- tLogRow
I would like my tLogRow to look like this:
.--------------------.
| tLogRow_2 |
|=------------------=|
|Name |
|=------------------=|
|Mike|
'--------------------'
|Linda|
'--------------------'
|Danny|
'--------------------'
195 Views
3 Replies

Anonymous
Not applicable
2016-06-21
02:07 PM
Author
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
195 Views

Anonymous
Not applicable
2016-06-23
03:19 PM
Author
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I tested and it works. This is just what I need for now. Thanx.
195 Views

Anonymous
Not applicable
2016-06-28
03:42 AM
Author
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I added new JSON object which has array of objects. So my new JSON looks this:
I wonder how can I get "NAME_T" values as well?
I was able to get this out, and it is not quite what I wanted:
I would like that under "NAME_T" would be 'Orange' and 'Pink'.
And on the picture you can see the settings in the tFileInputJSON:
How can I do that ?
{
"ORDER": ,
"HELP_NR": "554-5774",
"TEAM":
}
I wonder how can I get "NAME_T" values as well?
I was able to get this out, and it is not quite what I wanted:
.-----+--------+------.
| tLogRow_1 |
|=----+--------+-----=|
|NAME |HELP_NR |NAME_T|
|=----+--------+-----=|
|Mike |554-5774| |
|Linda|554-5774| |
'-----+--------+------'
I would like that under "NAME_T" would be 'Orange' and 'Pink'.
And on the picture you can see the settings in the tFileInputJSON:
How can I do that ?
195 Views
