Problem: JsonPathOnUrl with json arrays


#1

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


#2

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


#3

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


#4

Can you provide me with a full Formula?


#5

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

Tobias


#6

Thanks, I'll take a look at this.


#7

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


#8

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


#9

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


#10

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

Still working on those bugs...


#11

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


#12

Yeah, it did! Thank you very much