Just one record from json

Hi,

I try to use a json feed: https://polisen.se/api/events?locationname=Malmö

I use a json reader component and then a jsonpath where i extract to different columns. My problem is that I can not figure out how I should go about to fetch all record from the json feed, I only get the first one. I suspect I am missing something basic here, but would realy appreciate some guidance here.

Hi @twe

For this you need to use the collection query option in the JSON Path node. Select a field and click Add collection query. Ensure that the List box is checked.

It will then collect all the values and puts them in a list.

If you then use an Ungroup node, you will be able to get all the records in a table format.

Hope this helps!

6 Likes

Hi,

thank you som much for super fast response - exactly what I needed!

Everything works fine, but in the field name there is also a date- and timestamp inculded. What would be the easiest way to remove that, can it be done already in the json reader node or should I add another node to do that?

Yes, you need to do some post processing with other nodes to achieve that. That’s not possible within the JSON path.

2 Likes

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