Lets say we have what I would call a "hash":
var HASH =new Array();
HASH['one']='first';
HASH['two']='second';
HASH['three']='third';
I'd like to return that as JSON data.
Is there a direct way to do that?
Or do I have to make it out of something like this:
[['one'],['first']],[['two'],['second']],[['three'],['third']]
But I can't think of a direct way of addressing that without iterating
through the data and making a "hash".
There must be a direct way to write this.
Jeff
var HASH =new Array();
HASH['one']='first';
HASH['two']='second';
HASH['three']='third';
I'd like to return that as JSON data.
Is there a direct way to do that?
Or do I have to make it out of something like this:
[['one'],['first']],[['two'],['second']],[['three'],['third']]
But I can't think of a direct way of addressing that without iterating
through the data and making a "hash".
There must be a direct way to write this.
Jeff
Comment