2009/5/29 disccomp :
>
> I came across this quirk in PHP as well. IMHO, it is much better to
> fix the code on the server side than it would be to mess with
> (correctly functioning) code on the client. -Mark
> >
>
"Quirk"? I don't think this is a quirk.
At what stage should a string be automati
I came across this quirk in PHP as well. IMHO, it is much better to
fix the code on the server side than it would be to mess with
(correctly functioning) code on the client. -Mark
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Goog
Hi,
A brief OT before the actual question, you can make your each call
more efficient. Instead of:
objectToArray(json.element).each(function(ele){ ... }.bind
(this));
use each's second param, 'context':
objectToArray(json.element).each(function(ele){ ... }, this);
Enumerable#each wil
2009/5/29 dgalvez :
>
> the point is, sometimes i receive a json object like
>
> var json = {
> element: ['1','2','3']
> }
>
> and sometimes element has just one element so it is presented as
> a String not an Array:
> var json = {
> element: '1'
> }
>
>