-
Notifications
You must be signed in to change notification settings - Fork 602
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I can't see how to iterate over response returned from query #537
Comments
Just to add to this, it looks like YAML as the result, so I can convert it doing this:
and then I can iterate OK, but is this right? |
@brettskiii, this is really weird — the regular response from any method of the client is a Ruby When you initialize the client with the |
oh dear, yes that's it. I grabbed an example of the web that disabled ssl verification, and in the initialize it had format YAML. All good thank you pointed me exactly to the right area to fix 👍 |
Argh!, right, from here I guess :) Glad it's solved! |
hehe yeah, that's it :) |
disabling ssl did not solve my issue. Also its already a json. Posted a new issue elastic/elasticsearch-rails#1041 |
I'm doing something like this:
which returns a string..
JSON.parse(response)
will result in:or as suggested in the docs, the
mash = Hashie::Mash.new response
results in:I'm a bit lost been looking around for a solution, but can't seem to understand how to take the response returned from the client which comes in as a string and convert it to something I can iterate the results over.
The text was updated successfully, but these errors were encountered: