Merge Or Clone JSON objects

by VENKATA VINAY BYSANI

HTML

<div id="result"></div>
<button id="btn">Load Data</button>

CSS

body{
font-family: "Monaco", "Andale Mono", "Lucida Console", "Bitstream Vera Sans Mono", "Courier New", Courier, monospace; 
font-size: .85em;    
}

JavaScript

$("#btn").click(function () {

    var osSpecificJson = uiPropsJSON["OSName"];
    var tempOSSpecificJson = [];
    $.extend( tempOSSpecificJson, osSpecificJson );
    $("#result").html(JSON.stringify(tempOSSpecificJson));  
 
});


var uiPropsJSON = {
    "OSName": [{
        "PL": "Name",
            "PT": "Is like",
            "PSC": "Name Criteria",
            "id": "nameId"

    }, {
        "PL": "User ID",
            "PT": "In",
            "PSC": "User Criteria",
            "id": "userID"

    }, {
        "PL": "Emp ID",
            "PT": "In",
            "PSC": "Emp Criteria",
            "id": "empID"
    }, {
        "OtherData": "Other Data As Required"
    }],

        "OSName1": [{
        "PL": "Name11",
            "PT": "Is like",
            "PSC": "",
            "id": "nameId"

    }, {
        "PL": "User ID11",
            "PT": "In",
            "PSC": "",
            "id": "userID"

    }, {
        "PL": "Emp ID11",
            "PT": "In",
            "PSC": "",
            "id": "empID"
    }, {
        "OtherData": "Other Data As Required1"
    }]
};