Announcement: All noncommercial projects registered to use Earth Engine before
April 15, 2025 must
verify noncommercial eligibility to maintain Earth Engine access.
ee.List.replace
Stay organized with collections
Save and categorize content based on your preferences.
Replaces the first occurrence of oldval in list with newval.
Usage | Returns | List.replace(oldval, newval) | List |
Argument | Type | Details | this: list | List | |
oldval | Object | |
newval | Object | |
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-06-05 UTC.
[null,null,["Last updated 2024-06-05 UTC."],[[["\u003cp\u003eThe \u003ccode\u003ereplace\u003c/code\u003e method substitutes the first instance of \u003ccode\u003eoldval\u003c/code\u003e within the list with \u003ccode\u003enewval\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eIt operates on a list and returns a modified version of the same list.\u003c/p\u003e\n"],["\u003cp\u003eThe method requires the original list (\u003ccode\u003ethis\u003c/code\u003e), the value to be replaced (\u003ccode\u003eoldval\u003c/code\u003e), and its replacement (\u003ccode\u003enewval\u003c/code\u003e).\u003c/p\u003e\n"]]],[],null,["# ee.List.replace\n\nReplaces the first occurrence of oldval in list with newval.\n\n\u003cbr /\u003e\n\n| Usage | Returns |\n|--------------------------------|---------|\n| List.replace`(oldval, newval)` | List |\n\n| Argument | Type | Details |\n|--------------|--------|---------|\n| this: `list` | List | |\n| `oldval` | Object | |\n| `newval` | Object | |"]]