Is there any key/value pair structure in JavaScript? -


i want store information like:

pseudo-code

array(manager) = {"prateek","rudresh","prashant"}; array(employee) = {"namit","amit","sushil"}; array(hr) = {"priya","seema","nakul"}; 

what kind of data structure can use?

you can use arrays store list of data ; , objects key-value


in case, you'd use both :

var data = {     'manager': ["prateek","rudresh","prashant"],      'employee': ["namit","amit","sushil"],      'hr': ["priya","seema","nakul"] }; 

here, data object ; contains 3 arrays.


Comments

Popular posts from this blog

c# - How to set Z index when using WPF DrawingContext? -

razor - Is this a bug in WebMatrix PageData? -

visual c++ - Using relative values in array sorting ( asm ) -