Problem: JsonPathOnUrl with json arrays

Hey everybody,
I need you help on extracting data from an API that has the following structure:

[{"date": "201617","score": "37.98725594308311","domain": "www.example.com/directory/"}]

I would like to extract the score value but I assume SEO Tools for Excel have a problem with the response being nested as an array not an object (starting with "[" instead of "{"). I get back an error message:

Exception:JsonReaderException
Message:Error reading JObject from JsonReader. Current JsonReader item is not an Object: StartArray. Path ", line 1, position 1.

When I use the GetTextOnUrl Function I can grab the whole JSON response, therefore I have already eliminated any concerns about authentification to the API.

Do you have any idea on how I can get the score value? Is this a know issue or just a problem on my side?

Thanks a lot in advance!
Jean-Luc

This is fixed in next version of the tool. You can find a beta here but it's still quite buggy.

1 Like

Hey Niels,
any new updates on this?
I still can't get this query on a JSON array working in the current beta 5.4.2
Thanks a lot in advance,
Jean-Luc

Can you provide me with a full Formula?

Hi Niels,
I built an example using dummy data for you.
=JsonPathOnUrl("http://dev.tobias-kirchner.de/jsonpath.json";"$..url")
Hope this helps.

Tobias

Thanks, I'll take a look at this.

Do you have an estimated release date for the next version?

Sorry I don't. Working on some show-stopping bugs....

Looking forward to it. It's a great product. Thanks.

=Dump(JsonPathOnUrl("http://dev.tobias-kirchner.de/jsonpath.json";"$..url")) will work in 5.2.

Still working on those bugs...

Can you please try the latest beta and see if this solves you problem:

Yeah, it did! Thank you very much