Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5934147
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T15:04:23+00:00 2026-05-22T15:04:23+00:00

The following resp is a string that is similar to hash in structure. (rdb:1)

  • 0

The following resp is a string that is similar to hash in structure.

(rdb:1) p resp
"{\"_id\":\"4dd4eaa872f8be2d380000af\",\"account_id\":\"4dd0d71272f8be0499000009\",\"created_at\":\"2011-05-19T15:47:16+05:45\",\"line_id\":\"4dd4ea9d72f8be2d380000a5\",\"order\":{\"_id\":\"4dd4eaa872f8be2d380000b9\",\"amount\":1.2000000000000002,\"service_charge\":0.0},\"owner_id\":\"4dd0d71272f8be0499000008\",\"tenant_id\":\"4dca3f8e72f8be2950000003\",\"through_api\":true,\"title\":\"run name\",\"updated_at\":\"2011-05-19T15:47:16+05:45\"}"

How can I convert this into a hash?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T15:04:24+00:00Added an answer on May 22, 2026 at 3:04 pm

    This seems like a JSON encoded object.
    Try this:

    require 'json'
    p JSON.load(resp)
    

    json is part of Ruby 1.9, if you use 1.8 (or another Ruby implementation) you might need to install the json gem using gem install json.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

The following code causes an error: <c:set var=test value=test1/> <% String resp = abc;
i've following JS function. responseData:function(resp){ this.jsondata = eval('(' + resp + ')'); this.propList =
I have the following method: def call_http_service(url, url_params) begin conn = create_connection(url) resp =
I have the following xml that's sent to me from a web service. I'm
I receive three errors using the following function: Private Sub readWebpage(ByVal url As String)
Ok, I have Idhttp created dynamically like the following procedure TForm1.Button1Click(Sender: TObject); Var Resp
I'm developing a plugin. Take a look at the following code. string request(char post_params[])
My Javascript alert's undefined when trying to read the following JSON string: [ {
I have the following CURL that I am trying to convert to C#. I
Following is the association between 2 models: class FotoGossip < ActiveRecord::Base has_many :uploads end

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.