how to remove an entity from datasource

I loaded a geojson file via datasource.And entity type was billboard.I want to remove an entity.billboard,but don't know how to do it.

An entity has loads of sub fields. model, label, billboard and so on.
Not sure if it is of type billboard?

In case you want to remove the whole entity:

var streamingczml = new Cesium.CzmlDataSource();
var mamessag = JSON.parse(czmlUpdate.data);

streamingczml.entities.removeById(mamessag[1].id);

billboard has a show switch
https://cesiumjs.org/Cesium/Build/Documentation/BillboardGraphics.html

Not sure how you just remove a label/billboard. They are "null" though
before they are added So maybe setting them to null works.

https://cesiumjs.org/Cesium/Build/Documentation/BillboardCollection.html

BillBoardCollection has a

remove(billboard) → Boolean

You should be able to do that with code like the following:

Cesium.GeoJsonDataSource.load(’/my/geoJSON.geojson’, geojsonOptions).then(function (dataSource) {

viewer.dataSources.add(dataSource);

var entities = dataSource.entities.values;

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

var entity = entities[i];

if (Cesium.defined(entity.billboard)) {

entity.billboard = undefined;

// or

entities.remove(entity);

}

}

});

``

For more details on managing entities, see the Cesium Visualizing Spatial Data tutorial.

Thanks,

Gabby