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
2022, 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 the property value for the given index or key name.
Examples
Example title
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 |
---|---|---|
2022 | ✔ | Returns Array of [string, string | Array of string | number | Array of number | boolean | or Array of boolean] |
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]. |