我正在使用下面提到的 java 脚本生成 2 个 json 对象。我正在将我的 json 填充到表单字段中,现在的问题是我一次只能显示一个,如何同时在表单中显示另一个 json ?
//第一个json:
{"vIRnumber":"195412","dReceivedDate":"2012-06-06","vDescription":"GP Coils","fThickness":"888","fWidth":"4566","fQuantity":"122","vStatus":"work in progress"}
//第二个json:
{"vIRnumber":"45","dReceivedDate":"2012-04-26","dDate":"0000-00-00","dStartDate":null,"nPartyName":"Aasha","vDescription":"MS Channels","fThickness":"1.8","fWidth":"1220","fQuantity":"34523"}
//**i am filling the fields using the javascript below:**
var json =<?php echo($data); ?>;
for(key in json)
{
if(json.hasOwnProperty(key))
$('input[name='+key+']').val(json[key]);
}