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

  • Home
  • SEARCH
  • 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 5949163
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T17:12:37+00:00 2026-05-22T17:12:37+00:00

response = Typhoeus::Request.get(API_SERVER_ADDRESS + users/ + params[:id] +/friends + API_OAUTH_TOKEN) @parsed_json = ActiveSupport::JSON.decode(response.body) @parsed_json[‘get.friendlist’][friendslist].each

  • 0
response = Typhoeus::Request.get(API_SERVER_ADDRESS + "users/" + params[:id] +"/friends" + API_OAUTH_TOKEN)
@parsed_json = ActiveSupport::JSON.decode(response.body)

 @parsed_json['get.friendlist']["friendslist"].each do |first_name, last_name|
 p first_name
 end

Json Format:-

    {
        -get.friendlist: {
            -friendslist: [
            -{
                id: "6"
                first_name: "Jeyaprabhu"
                last_name: "Palanichamy"
                im_screen_name: ""
                email: "Jeyaprabu@abc.net"
                password: "c4cce19cf6453c10754339a15cf9265d"
                mobile: ""
                date_of_birth: ""
                gender: "male"

            }
            -{
                id: "72"
                first_name: "Saravanan"
                last_name: "R"
                im_screen_name: "Saravanan R"
                email: "r.saravanan@abc.net"
                password: "7cc2f5546b199421184a287bb75c406d"
                mobile: ""
                date_of_birth: "9/9/1985"
                gender: "male"


            }
            ]
        }
    }

Its not printing the value of first_name..

  • 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-22T17:12:37+00:00Added an answer on May 22, 2026 at 5:12 pm

    Try this..

    <% @parsed_json['get.friendlist']["friendslist"].each do |json_output| %>
      <%=  json_output['first_name'] %>
    <% end %>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

@response = Typhoeus::Request.get(FOUR_SQUARE_API_SERVER_ADDRESS+'search?ll=' + current_user.altitude.to_s + &query=+ params[:query] + FOUR_SQUARE_API_ACESS_CODE) @venues = ActiveSupport::JSON.decode(@response.body) @venues['response']['groups'][0]['items'].each
response = Typhoeus::Request.get(http://localhost:3000/api/api_email/#{@api_id}.json) JSON.parse(response.body) The response is a JSON object but I get an
I get some Json response with a list of objects. onComplete: function (id, fileName,
When I call Response.Redirect(someUrl) I get the following HttpException: Cannot redirect after HTTP headers
I have a JSON response from a web service that I need to be
WebResponse response; try { HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url); request.Timeout = 20000; response = request.GetResponse();
The response body of HTTP requests using the native 'http' module, displays question mark
The response of my request is a java script code. When I put the
JSON response is as follows: {approvals: [ {approval: { id:0121920, key:T100, value:Ben Tsu }
As response from .net service I get this date format: /Date(1233323754523+0100)/ 1233323754523 is date

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.