By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,400 Members | 1,335 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,400 IT Pros & Developers. It's quick & easy.

Accessing comma separated data from an javascript array object

P: 5
I have a global array to which I provide data from one function and want to use that data into another function.

i.e. i get the values of sitecode, x and y from function A
siteCode = x = y =

windQueryDataArray = [[siteCode, x, y]];

I want to use this array in function B from which I want to compare value of siteCode with site code value I am getting from another source in function B to match the values of x and y accordingly... how can I do this?

Sample of windQueryDataArray's data is
("KAXA", 92.144, 91.222)

("KCID", 91.111, 93.212)

Thanks in advance!

Nov 17 '11 #1
Share this Question
Share on Google+
1 Reply

Expert Mod 15k+
P: 16,027
Firstly, you need to access the sitecode value. That would be as simple as
Expand|Select|Wrap|Line Numbers
  1. windQueryDataArray[i][0]
for the ith data point.
Nov 17 '11 #2

Post your reply

Sign in to post your reply or Sign up for a free account.