I need to convert an string to hash so that i can use its "id" attribute. I am getting this string due to following code in my .js.erb file:
$('#link_id').data('test', "<%= @record_obj.as_json %>");
I am getting string in following format:
"{"id"=>166,"first_name"=>James}"
I need to convert above string to hash so that i can access "id" of the object.
Any help will be appreciated. Thanks :)