ee.Array.sort
با مجموعهها، منظم بمانید
ذخیره و طبقهبندی محتوا براساس اولویتهای شما.
عناصر آرایه را در یک محور مرتب می کند.
استفاده | برمی گرداند | Array. sort ( keys ) | آرایه |
استدلال | تایپ کنید | جزئیات | این: array | آرایه | آرایه تصویر برای مرتب سازی. |
keys | آرایه، پیش فرض: null | کلیدهای اختیاری برای مرتب سازی بر اساس. اگر ارائه نشده باشد، از مقادیر به عنوان کلید استفاده می شود. کلیدها فقط می توانند چندین عنصر در امتداد یک محور داشته باشند که جهت مرتب سازی را تعیین می کند. |
جز در مواردی که غیر از این ذکر شده باشد،محتوای این صفحه تحت مجوز Creative Commons Attribution 4.0 License است. نمونه کدها نیز دارای مجوز Apache 2.0 License است. برای اطلاع از جزئیات، به خطمشیهای سایت Google Developers مراجعه کنید. جاوا علامت تجاری ثبتشده Oracle و/یا شرکتهای وابسته به آن است.
تاریخ آخرین بهروزرسانی 2025-07-24 بهوقت ساعت هماهنگ جهانی.
[null,null,["تاریخ آخرین بهروزرسانی 2025-07-24 بهوقت ساعت هماهنگ جهانی."],[[["\u003cp\u003eThe \u003ccode\u003esort\u003c/code\u003e method arranges elements within an array along a single axis.\u003c/p\u003e\n"],["\u003cp\u003eBy default, \u003ccode\u003esort\u003c/code\u003e uses the array values for sorting; however, optional \u003ccode\u003ekeys\u003c/code\u003e can be specified for customized sorting based on another array with matching dimensions.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003ekeys\u003c/code\u003e array must have multiple elements along only one axis to determine the sort direction.\u003c/p\u003e\n"],["\u003cp\u003eThe modified array, with elements sorted according to the specified logic, is returned by the \u003ccode\u003esort\u003c/code\u003e method.\u003c/p\u003e\n"]]],[],null,["# ee.Array.sort\n\nSorts elements of the array along one axis.\n\n\u003cbr /\u003e\n\n| Usage | Returns |\n|------------------------|---------|\n| Array.sort`(`*keys*`)` | Array |\n\n| Argument | Type | Details |\n|---------------|----------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| this: `array` | Array | Array image to sort. |\n| `keys` | Array, default: null | Optional keys to sort by. If not provided, the values are used as the keys. The keys can only have multiple elements along one axis, which determines the direction to sort in. |"]]