OSM Nominatim

Hi,
I just play around with Nominatim
http://wiki.openstreetmap.org/wiki/Nominatim
with format=json

The objects I get, have the attribute class (values: place, boundary…)
Now I have the problem that I can’t address this attribute because class is a reserved word in Javascript…

Has anybody a solution for this?
Thanks
Ruth

Hi,
eval(“obj.class”) helps…

Ruth

Hi,
still not works in IE…
Only idea I have:

for (var part in obj) {
if (part == “class”) {
alert(obj[part]);
}
}

No better idea?
– Ruth

use

format=jsonv2

which renames class to category

And I’ll go and document the fix - it’s been there for a while!

Twain,
Thanks a lot

Ruth