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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T15:28:55+00:00 2026-06-10T15:28:55+00:00

i passed a json_encode d array to javascript. Now i would like to acces

  • 0

i passed a json_encoded array to javascript. Now i would like to acces that array to get the different elemtnts.

i print it out in the console.log() and i get this array:

array(1) {
  [16]=>
  array(2) {
    [3488]=>
    array(1) {
      [0]=>
      array(2) {
        ["article_no_internal"]=>
        string(6) "999184"
        ["article_name_internal"]=>
        string(29) "Geschenkbox Kerzenschein 2011"
      }
    }
    [2615]=>
    array(1) {
      [0]=>
      array(2) {
        ["article_no_internal"]=>
        string(6) "700469"
        ["article_name_internal"]=>
        string(29) "Hotelscheck RomantischeTagef2"
      }
    }
  }
}

This is about right. How can i access the article_name of the second array, with the ID 2615?

found a related question here reading a jsone object, hope for some better explebation or answer. Thanks.

EDIT:

As it seems i made a mistake, i showed a php var_dump in the console. When i try to show the javascript array in the console i get undefined.

  • 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-10T15:28:57+00:00Added an answer on June 10, 2026 at 3:28 pm

    Since JSON means “JavaScript Object Notation” you don’t need to do anything to access the object’s items.

    For example you can access:

    jsonObject[2615][0]["article_name_internal"]
    

    if this object is String, use eval to convert the string to a JavaScript object and access the items in the same way with the previous example.

    var jsonObject = eval(jsonstring);
    jsonObject[2615][0]["article_name_internal"]
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

A php script is giving this array (which has been passed through json_encode() )
If I use json_encode() on an array like this: return json_encode(array( 'foo' => 'bar'));
In my php file I have: $arr[] = array(status=>0); echo json_encode($arr); In my javascript,
Hi I am having a problems displaying my array via JSON object. I passed
I'm using json_encode() and the files that I am using will be parsed to
I will like to add an extra item for my listview. For now i
I've been trying to find out why this 'json_encode'd string isn't parsing out correctly,
I have a multi-dimensional associative array that is encoded into JSON for database storage,
I am building a request in Flash that contains a JSON encoded Array of
Three days had passed and still having problems to get this things work. This

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.