I think the problem lies in that the key name is "values" hash.values actually returns the values of a hash and that's an internal Ruby hash method.
Try using connections[:values] instead.
質問
I'm trying to access a hash with all the values for each connection. Right now, it's connections.values[1]
in order to bypass _total
.
There are certain cases when _total
doesn't show up for certain ppl, thus rendering the code above invalid.
I also tried connections.values
by that spits out the value 450
instead off the actual connections. How do I make sure to ignore _total : 450
in cases that it does appear and just access the persons information instead?
解決
I think the problem lies in that the key name is "values" hash.values actually returns the values of a hash and that's an internal Ruby hash method.
Try using connections[:values] instead.