---
sourceDocument: 요코하마 ServiceNow AI 플랫폼 관리
sourceDocumentLink: https://servicenow-prod.fluidtopics.net/r/ko-KR/yokohama/platform-administration

 Release :

    - yokohama

ft:locale :

    - ko-KR

ft:publication_title :

    - 요코하마 ServiceNow AI 플랫폼 관리

ft:clusterId :

    - platadm

bundleId :

    - platadm

workflow :

    - Platform


---

# 이름-값 쌍 필드 유형

# 이름-값 쌍 필드 유형 {#ariaid-title1}

* 릴리스 버전: Yokohama
* 
* 업데이트 날짜 2026년 06월 25일
* 
* ![](https://www.servicenow.com/docs/portal-asset/ico-clock) 소요 시간: 1분

이름을 사용하여 스크립트의 이름-값 쌍 필드에 저장된 값에 액세스할 수 있습니다.

## 샘플 스크립트 {#name-value-pair-scripting__section_tjh_wtz_lz}

다음 예제에서는 이름-값 쌍 필드에 매핑을 추가하는 방법과 이름을 사용하여 기존 값을 쿼리하는 방법을 보여줍니다.

    // Script example demonstrating setting and getting values
    var gr = new GlideRecord('u_nv_table');
    gr.initialize();

    gr.nv_field.name1 = "value1"; //add a name-value Pair mapping with the name "name1" and value "value1"
    gr.nv_field.name2 = "value2"; //add another name-value Pair mapping with the name "name2" and value "value2"

    // Access by dot notation
    gs.print("name1 = " + gr.nv_field.name1); // Expected output: name1 = value1

    // Iterate over each property and print name and value
    for(var name in gr.nv_field) {
        gs.print(name + " = " + gr.nv_field[name]);
    }

    gs.print(gr.nv_field); // Expected output: {"name1":"value1","name2":"value2"}


