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 8856999
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T14:29:15+00:00 2026-06-14T14:29:15+00:00

I am trying to learn how to retrieve data from a json obj that

  • 0

I am trying to learn how to retrieve data from a json obj that I return from PHP but I can not figure out how to get the values. My data looks something like this:

[{"user_name":"herp"},{"email":"herp.derp@gmail.com"},{"yy":"yyyy"},{"mm":"mm"},{"dd":"dd"}]

My client-side script looks something like this:

        $.ajax({
        type : 'POST',
        url : 'serverside/get_installningar.php',
        dataType : 'json',
        success : function(data) {

        }
    });

I would like to type something like data.user_name to retrieve the user_name and so on. But is there a method for doing this? I have looked in the forum but can’t find the right thing.

  • 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-06-14T14:29:16+00:00Added an answer on June 14, 2026 at 2:29 pm

    What you have is an array of objects and so you going to need to know where it is to get user_name,

    data[0].user_name
    

    see below for structural details,

    [
     {"user_name":"herp"},   // <-- data[0]
     {"email":"herp.derp@gmail.com"}, // <-- data[1]
     {"yy":"yyyy"},  // <-- data[2]
     {"mm":"mm"},    // <-- data[3]
     {"dd":"dd"}     // <-- data[4]
    ]
    

    As AndrewR pointed out,

    This will work, but it would be better to fix the JSON format coming from PHP. {"user_name":"herp","email":"herp.derp@gmail.com","yy":"yyyy","mm":"mm","dd":"d‌​d"} and then his original plan will work.

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

Sidebar

Related Questions

Trying to learn PL/SQL with multimedia data. Can anyone please point out that from
Trying to learn Sencha Touch 2 and I can't seem to find out how
I´m trying to learn C#, coming from a Python/PHP background, and I´m trying to
I'm trying to learn how to use CURL and Json to access data sent
I am trying to learn the MVC architecture. But I am not able to
I am trying to retrieve the ID of the submitted data that the user
I am trying to learn LINQ to XML. I can not write a query
Trying to learn about php's arrays today. I have a set of arrays like
im trying to learn delegates and events in c#, i understand that an event
Alright, so here's my problem. I'm trying to write a script in PHP that

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.