maxmind/libmaxminddb

How to fetch the "subdivisions names en" with default value if subdivisions are missing

AnoopPutta opened this issue · 1 comments

I am using the geolite2 city database, and wanted to fetch the subdivisions.
I see that subdivisons is an array and is not available always.
when i try to fetch subdivisions using the below command if subdivisions are missing, see the error "Got an error looking up the entry data - The lookup path does not match the data (key that doesn't exist, array index bigger than the array, expected array or map where none exists)". Is there a way i can pass the default value?

mmdblookup --file GeoLite2-City.mmdb --ip 30.128.104.111 subdivisions 0 names en

It sounds like you contacted support. I'll close this out.