On 12/05/2012 12:11 PM, David E. Wheeler wrote:
> On Dec 4, 2012, at 10:05 AM, Josh Berkus <josh@agliodbs.com> wrote:
>
>>> json_get(json, variadic text) => json
>> Given that I already do the equivalent in Python, this would suit me
>> well. Not sure about other users ...
> Well, given that sometimes you will have mixed arrays and objects, how would you distinguish "42" as an object key or
anarray index?
if the thing is an array, test to see if the string is a valid integer
string, and if so use the integer value.
cheers
andrew