哈希:
p: {:headline=>"Managing Director at Test company name", :pid=>"0tSsRvCR7r", :first_name=>"John", :last_name=>"Doe", :industry=>"Financial Services", :summary=>nil, :public_profile_url=>"http://www.linkedin.com/pub/john-doe/7a/78/606", :distance=>0}
Run Code Online (Sandbox Code Playgroud)
试图调用p.pid但收到错误:
EXCEPTION: undefined method `pid' for #<Hash:0x007fcf1b3a29f0>
Run Code Online (Sandbox Code Playgroud)
所有其他元素都可以正常访问.也为该领域尝试了不同的名称但无济于事.有人可以对此有所了解吗?真的希望它不是你长时间盯着的那些错误之一,只是意识到它是愚蠢的:/.
注意:我也试过p ['pid'].这也不起作用.Rails相对较新.