Indexing in JSON path node not working as expecting

Dear all,

I am trying to retrieve data with an API from Eurostat. I retrieve the data in JSON format and try to extract the correct fields in the JSON Path node. The data comes structured in the same way each time expect for 1 place I want to extract it from:

The path that works:
$.dimension.tra_infr.category.label.*

How i want it:

$.dimension.*[1].category.label.*

it is always at the second element of the array. But indexing this way does not seem to work. Removing the * does not solve the problem.

Anyone who could assist into the correct indexing?

Thank you very much.

The API key being tested:
ec.europa.eu/eurostat/api/dissemination/statistics/1.0/data/TRAN_R_NET?format=JSON&time=2022&GEO=DE40&tra_infr=MWAY&unit=KM

What exactly are you trying to extract?

The Value within the tra_infr layer. In my example it is extracting: “Motorways”

However I want to refer to that layer via indexing and not specifically using: “tra_infr” since this naming can change.

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