Announcement: All noncommercial projects registered to use Earth Engine before April 15, 2025 must verify noncommercial eligibility to maintain Earth Engine access.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2023-10-06 UTC."],[[["\u003cp\u003eThe \u003ccode\u003eget()\u003c/code\u003e method is used to extract a specific property from a Feature or FeatureCollection in Earth Engine.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003epropertyNames()\u003c/code\u003e method provides a list of all property names associated with a Feature or FeatureCollection.\u003c/p\u003e\n"],["\u003cp\u003eThe value returned by \u003ccode\u003eget()\u003c/code\u003e is an \u003ccode\u003eee.ComputedObject\u003c/code\u003e and might need to be cast to a specific Earth Engine object type for further processing.\u003c/p\u003e\n"],["\u003cp\u003eThe provided examples demonstrate how to access and utilize the extracted property value in both JavaScript and Python environments.\u003c/p\u003e\n"]]],["The core functionality involves extracting a specific property from a FeatureCollection using the `get(property)` method. This method requires the feature itself and the property name as input. The returned value is initially an `ee.ComputedObject`, which must be cast to the appropriate Earth Engine object type (e.g., `ee.String`) for further use. Examples demonstrate accessing property names via `propertyNames()` and extracting the 'provider' property from a power plant FeatureCollection in both JavaScript and Python.\n"],null,["Extract a property from a feature.\n\n\u003cbr /\u003e\n\n| Usage | Returns |\n|-----------------------------------|---------|\n| FeatureCollection.get`(property)` | |\n\n| Argument | Type | Details |\n|----------------|---------|-------------------------------------------|\n| this: `object` | Element | The feature to extract the property from. |\n| `property` | String | The property to extract. |\n\nExamples\n\nCode Editor (JavaScript) \n\n```javascript\n// A global power plant FeatureCollection.\nvar fc = ee.FeatureCollection('WRI/GPPD/power_plants');\n\n// View a list of FeatureCollection property names.\nprint(fc.propertyNames());\n\n// Get the value of a listed property.\nprint('Global power plant data provider as ee.ComputedObject',\n fc.get('provider'));\n\n// The returned value is an ee.ComputedObject which has no methods available for\n// further processing; cast to the relevant Earth Engine object class for use.\nprint('Global power plant data provider as ee.String',\n ee.String(fc.get('provider')));\n```\nPython setup\n\nSee the [Python Environment](/earth-engine/guides/python_install) page for information on the Python API and using\n`geemap` for interactive development. \n\n```python\nimport ee\nimport geemap.core as geemap\n```\n\nColab (Python) \n\n```python\n# A global power plant FeatureCollection.\nfc = ee.FeatureCollection('WRI/GPPD/power_plants')\n\n# View a list of FeatureCollection property names.\nprint(fc.propertyNames().getInfo())\n\n# Get the value of a listed property.\nprint('Global power plant data provider as ee.ComputedObject:',\n fc.get('provider').getInfo())\n\n# The returned value is an ee.ComputedObject which has no methods available for\n# further processing; cast to the relevant Earth Engine object class for use.\nprint('Global power plant data provider as ee.String:',\n ee.String(fc.get('provider')).getInfo())\n```"]]