support binary keys and single object

i.e. iterate through a single object as if it is a single element
array.

Signed-off-by: Christopher Hall <hsw@ms2.hinet.net>