Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello Team,
I have to read Json Output from URL. I am able to do that.
Then I have to parse the json data to extract the different fields and its value. The issue is that these fields are at different path. SOme of them at the root path and others are embedded within other objects. for eg:
"total_items": 12,
"page_count": 1,
"items": [
{
"landing_id": ",
"token": "",
"response_id": "",
"landed_at": "2021-08-23T10:28:29Z",
"submitted_at": "2021-08-23T10:28:31Z",
"metadata": {
"user_agent": "",
"platform": "other",
"referer": "",
"network_id": "6ad90d4091",
"browser": "default"
},
"hidden": {
"cid": "xxxxx",
"language": "xxxxx",
"sku": "xxxxx"
my output fields in database are are:
response_id
landed_at
submitted_at
network_id
cid": "xxxxx",
language": "xxxxx",
sku": "xxxxx"
as you see the 1st 3 fields are from root path and others are from embedded objects in root path. How to merge/get this output in single textractJasonfields component? I am able to extract the values from the above fields independently, but unable to merge them into a single output. Any advice will be helpful here.
Using the JSON you have posted here I have built an example of what you would need. My tExtractJsonFields component is configured like below....
The Loop Jsonpath query is set to "$.items[*]".
For the paths to the fields you simply supply the path after the "items" array. So, for example, "cid" is just "hidden.cid" .
Using the JSON you have posted here I have built an example of what you would need. My tExtractJsonFields component is configured like below....
The Loop Jsonpath query is set to "$.items[*]".
For the paths to the fields you simply supply the path after the "items" array. So, for example, "cid" is just "hidden.cid" .
@rhall: Excellent! it works perfectly fine for my requirement. Thanks a lot again 🙂