Posts

Showing posts from August, 2015

How to extend a JSON array in Jquery

Suppose you get a JSON  Object like this var optionsoptions;  $.getJSON("relaytemplateattributes.json" , function(result){ optionsoptions=result.optionsoptions;  }); /*JSON LIST FORMAT*/ {"optionsoptions":[{"OPTIONID":-1,"COMBOITEM":"---SELECT--"},{"OPTIONID":1,"COMBOITEM":"-3U0Comp"}, {"OPTIONID":1,"COMBOITEM":""},{"OPTIONID":1,"COMBOITEM":"-U2comp"}, {"OPTIONID":1,"COMBOITEM":"Ipol"},{"OPTIONID":1,"COMBOITEM":"-U2"}, {"OPTIONID":1,"COMBOITEM":"-3U0"},{"OPTIONID":1,"COMBOITEM":"Dual"}, {"OPTIONID":2,"COMBOITEM":"0 deg"},{"OPTIONID":2,"COMBOITEM":"180 deg"} {"OPTIONID":3,"COMBOITEM":"1 out of 3"},{"OPTIONID":3,"CO