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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T09:52:15+00:00 2026-06-10T09:52:15+00:00

Here is my JSON array: msg={userid:82,0:82,first:A,1:A,last:B,2:B,email:w@w.com,3:w@w.com,username:n,4:n,password:o,5:o,hash:3242,6:3242,active:0,7:0,date:0,8:0,holding:,9:,ip:0,10:0,attempts:0,11:0} now I am trying to get the different

  • 0

Here is my JSON array:

msg={"userid":"82","0":"82","first":"A","1":"A","last":"B","2":"B","email":"w@w.com","3":"w@w.com","username":"n","4":"n","password":"o","5":"o","hash":"3242","6":"3242","active":"0","7":"0","date":"0","8":"0","holding":"","9":"","ip":"0","10":"0","attempts":"0","11":"0"}

now I am trying to get the different parts but nothing I try works. I have tried

msg.first //returns undefined
msg['first'] // returns undefined
msg[0] // returns that first bracket {

I am sure this can be easily solved, I just dont know what the issue is. This array is output by some php using json_encode(). If that code is relavent please let me know and I will put it up. Thanks.

  • 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-10T09:52:17+00:00Added an answer on June 10, 2026 at 9:52 am

    If msg[0] returns the first bracket, your JSON is somehow being interpreted as a string. This can be easily fixed through jQuery’s parseJSON():

    msg = $.parseJSON(msg);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a json array with certain objects : first name , last name,
Here's the array which I m trying to convert to a JSON Object: Array
How to get array data from json in c#? Here is the ajax code
I have a outsource data from : http://example.com/data/news.json Here is the example result after
I'm using cocoa JSON framework http://code.google.com/p/json-framework/ Here is the result of an JSON output
The problem here is pretty self-evident from the resulting JSON array at the bottom.
I am trying to sort a multidimensional JSON array (called jsontest here) using JQuery
I need help here in my practice program. I have a json array: myData=[{plank_number:1,thickness:5,width:7,length_t:8,quantity:1},
I'm using Jackson to deserialize a json array into some objects. Here's my class:
I need assistance in accessing a nested array located my JSON Data Set. Here

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.