How to get the value of a property of a GeoJSON entity


Imagine I have a GeoJSON stream, which contains this entry:


In my JavaScript code, that entity is represented in the entity variable below.

    var entities = dataSource.entities.values;
    var colorHash = {};
    for (var i = 0; i < entities.length; i++) {
        var entity = entities[i];

How can I access the value of the "modelFile" property of the GeoJSON property?

Thanks in advance

Dmitri Pisarenko


Only 20 minutes ago I added to the “access entity properties from CZML” post. Matt Amato helped me resolve this very question (I used CZML, but he-that-is-more-knowledgeable-than-I assures me that the approach is the same). Hope this is of use. Cheers, erik