Hi I need help regarding JSON path node.

Hello, I have a file in XML and JSON format. I want to extract the particular values from the file. But The XPATH node returns falls and JSON returns null. The data type is attached here as image. I want to extract only the “IDs with type PDB”. Kindly help me with this.
looking forward to hearing from You. Thank You in Advance.

Hi @Faheeemahmed,

Can you attach a sample JSON file or a part of it so I can share a workflow?

:blush:

Hello, Armingrudd.
Thank You for your timely response. I have attached the sample JSON file.
Row3.json (152.4 KB)
I have such 59 rows and I want to just extract IDs with Type =PDB.

1 Like

Hello, @Armingrudd.
Thank You for your timely response. I have attached the sample JSON file.

You have to use this path:

$['entry']['evidence'][*]['source']['dbReference'][?(@.@type=='PDB')]['@id']

Here is an example workflow:
34865.knwf (26.7 KB)

:blush:

5 Likes

Thank You Very much @armingrudd. It really worked for me. I had been trying this for more than 5 hours. You made my day.
Thank you again

2 Likes

Great work @armingrudd
could you elaborate on the “@.” ?

@ is used in filters to refer to the current node.
Here is a guide on JSON path syntax:
https://support.smartbear.com/alertsite/docs/monitors/api/endpoint/jsonpath.html

:blush:

2 Likes

Thank You very much @armingrudd

2 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.