item
Syntax

EntMetaData.item(index);
Parameters
index number or string
The index (number) or name (string) of the metadata item in the metadata object.
Return value Array
2023, 2024 up to and including 19.0.5, 2025 up to and including 20.0.2
Array[0] (property key): string
Array[1] (property value): string, string[], number, number[], boolean or boolean[]
2024 from 19.0.6 onwards, 2025 from 20.0.3 onwards
Array[0] (property key): string
Array[1] (property value): string or string[]
Description
The item() method returns a key-value pair for the item at the given index or with the given key name. The returned array always contains two elements: Array[0] is the property key (string) and Array[1] is the property value.
Examples
Access metadata items by index and by key name
try {
var doc = app.documents.item(0);
// Access the document’s metadata
var md = doc.entMetaData;
// Get the item by property name.
var idItem = md.item("Core_ID");
alert("idItem key: [" + idItem[0] + "]"); // Core_ID
alert("idItem value: [" + idItem[1] + "]"); // 7635
// Get the item by property name.
var nameItem = md.item("Core_Name");
alert("idName key: [" + nameItem[0] + "]"); // Core_Name
alert("idName value: [" + nameItem[1] + "]"); // "TestDocument"
} catch (e) {
desc = e.description;
num = e.number;
alert("error " + num + ": " + desc);
}
Supported versions
| Adobe Version | Supported | Description |
|---|---|---|
| 2023 | ✔ | Returns Array of [string, string | Array of string | number | Array of number | boolean | or Array of boolean] |
| 2024 | ✔ | From v19.0.6 onwards, returns Array of [string, string | Array of string]. |
| 2025 | ✔ | From v20.0.3 onwards, returns Array of [string, string | Array of string]. |
| 2026 | ✔ | Returns Array of [string, string | Array of string]. |