access value in universal_variable array

Posted on 2014-01-15
Last Modified: 2014-01-15
window.universal_variable.test = {   
	value_1: "MI1849",
	value_2: "GBP",
	value_3: 777.52,
	value_4: [
		value_4_1: {
			value_4_1_1: "13456",
			value_4_1_1: "78978",
			value_4_1_1: "98765465",
			value_4_1_1: "22"
		value_4_2: 1,
		value_4_3: 769.82
	value_5: ""

Open in new window

I would like to use javascript to access the value of value_4_1_1. How can I do this?
I can successfully target value_4 for example by targeting window.universal_variable.test.value_4

Question by:Al4ddin2
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
LVL 25

Expert Comment

by:Luis Pérez
ID: 39781983
Mmmmm... try
as you defined value_4 to be an array

Hope that helps.
LVL 25

Accepted Solution

Luis Pérez earned 500 total points
ID: 39781985
Sorry, I failed. I think it should be:

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Echo'd values in dropdowns 6 57
Why am I getting ReferenceError:  boxes is not defined error 5 33
Make Float not to Wrap 15 66
Why is my select returning NaN 23 37
Article by: DanRollins
This article describes a JavaScript program that creates a maze made of hexagonal cells.  In Part 2 (, we'll extend the program by adding a depth-…
The task A number given should be formatted for easy reading by separating digits into triads. Format must be made inline via JavaScript, i.e., frameworks / functions are not welcome. So let’s take a number like this “12345678.91¿ and format i…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

732 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question