Why is this NaN to javascript?
- by MJB
I have this object printed with console.log
Array[1]
0: Object
address: "blablabalbala"
datatype: "Location"
icon: "cafetaria"
id: "/mensa/wo_mensa1_turm.std.php"
kind: "Mensa"
lat: 50.777016
lon: 6.080348
sortkey: "zeltmensa, forum cafete"
stationId: "/mensa/wo_mensa1_turm.std.php"
title: "Zeltmensa, Forum Cafete"
type: "Mensa"
But console.log("nav to: "+data[0].lat+" "+data[0].lon); gives me undefined undefined, and at another point NaN NaN.. I don't understand this. It also doesn't let me use any other attributes like data[0].addresse, which returns undefined aswell.
Thanks for help.