Hassan Schroeder wrote in post #1119612:
> On Mon, Aug 26, 2013 at 12:42 PM, Love U Ruby <lists@ruby-forum.com>
> wrote:
>>
>> My question is how should I get the hash {1=>2,3=>{4=>5,6=>7}} from that
>> string?
>
> Why don't you generate valid JSON in the first place?
>
> `{1=>2,3=>{4=>5,6=>7}}.to_json` would show you what the string
> should look like (and why your example is so broken).
In my case the hash is inside the string,but I want the hash back from
the string? :( I don't know how to do this...
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/9bda948da535446a2d4499e4dde12c62%40ruby-forum.com.
For more options, visit https://groups.google.com/groups/opt_out.
No comments:
Post a Comment