javascript - Edit XML using JSON? -


i'm customising web-based tool allows sccm functionality via web console, can found here.

i can see following code in javascript file, using json "get" function read values of file @ url "/api/computer/getreportsinfo", , assigning values couple of variables:

    $.get("/api/computer/getreportsinfo", function (items) {         computervm.reportsviewmodel.sitecode = items["sitecode"];         computervm.reportsviewmodel.reportserver = items["reportserver"];     }, "json"); 

this xml(?) looks @ url:

<arrayofkeyvalueofstringstring xmlns:i="http://www.w3.org/2001/xmlschema-instance" xmlns="http://schemas.microsoft.com/2003/10/serialization/arrays">     <keyvalueofstringstring>         <key>sitecode</key>         <value>mysitecode</value>     </keyvalueofstringstring>     <keyvalueofstringstring>         <key>reportserver</key>         <value>myreportserver.mydomain.local</value>     </keyvalueofstringstring> </arrayofkeyvalueofstringstring> 

i can't find other files containing of information, have no idea how set. there way can add new key , value pair via javascript?

i hoping work doesn't:

    $.set("/api/computer/getreportsinfo", function (items) {         items["newkey"] = new items;     }, "json"); 

any advice appreciated.


Comments

Popular posts from this blog

account - Script error login visual studio DefaultLogin_PCore.js -

xcode - CocoaPod Storyboard error: -