# propEach

Iterate over properties in any GeoJSON object, similar to Array.forEach()
遍历任何GeoJSON对象中的属性,类似于Array.forEach()

> npm install @turf/meta

参数

参数 类型 描述
geojson (FeatureCollection|Feature) 任何 GeoJSON 对象
callback Function 回调函数 (currentProperties, featureIndex)

返回

undefined - undefined

示例

var features = turf.featureCollection([
    turf.point([26, 37], {foo: 'bar'}),
    turf.point([36, 53], {hello: 'world'})
]);

turf.propEach(features, function (currentProperties, featureIndex) {
  //=currentProperties
  //=featureIndex
});
Last Updated: 4/10/2024, 11:27:54 PM