how to get czml data name,id in diffrent current time

1.I have a point czml and I want to get the data at the current time and update infobox, but i cant
2.my method is:

viewer.clock.onTick.addEventListener(function(clock)
{

    viewer.infoBoxViewModel.titleText =
    defaultValue(selectedEntity.name,selectedEntity.id);

});
3.i want show the time czml ,and show infobox
4.czml version is 1.36.0

Hi there,

I think the best solution for this case would be to iterate through your entities and set the name to the id if no name is provided. That way, the infoBox will show exactly what you want and behave as expected.

var entities = viewer.entities.values;

for (var i = 0; i < entities.length; ++i) {

var entity = entities[i];

if (!Cesium.defined(entity.name)) {

entity.name = entity.id;

}

}

``

Thanks,

Gabby