joshbuddy / jsonpath

Ruby implementation of http://goessner.net/articles/JsonPath/
MIT License
447 stars 72 forks source link

TypeError: 0 is not a symbol nor a string exception #121

Closed incubus closed 1 year ago

incubus commented 5 years ago

Hi!

I got an exception

> JsonPath.new('$.responsesData.responses.*[*]').on(data)
TypeError: 0 is not a symbol nor a string
from /Users/incubus/.rvm/gems/ruby-2.6.5/gems/jsonpath-1.0.5/lib/jsonpath/enumerable.rb:17:in `each'

with this data https://pastebin.com/enRUR5EH .

But it works in evaluators:

image

image

Something is wrong with my path? Thanks!

Best regards, Alexander

Skarlso commented 5 years ago

Hi @incubus. I'll take a look later on. I'm a bit busy right now, but I'll get back to you! :)