wasm-spatial-core
    Preparing search index...

    Function addProperty

    • Add a property to all features in a GeoJSON FeatureCollection.

      Operates at the serde_json::Value level — no full GeoJSON DOM construction, just lightweight JSON manipulation.

      Arguments

      • input — GeoJSON string (FeatureCollection only).
      • key — Property key to add.
      • value — Property value (parsed as JSON: strings, numbers, booleans).

      Returns

      Modified GeoJSON string with the property added to every feature.

      Parameters

      • input: string
      • key: string
      • value: string

      Returns string