json応答を取得するための以下のコードがあります。プロパティ「applicant」を抽出して、htmlテキストフィールドに配置する必要があります。しかし、私はそれを行う方法がわかりません。コンソールに応答が表示されますが、テキストフィールドに[object Object]と表示されますが、テキストフィールドに取得するにはどうすればよいですか?ヒントはありますか?ありがとうございました。
<html>
<head>
<script type="text/javascript"
src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
<script type="text/javascript">
document.getElementById('sudata').value = budata;
}
});
</script>
</head>
<body>
<form name="form1" id="form1">
<input type="text" name="sudata" id="sudata" value="" size="100">
</form>
</body>
</html>
応答はここにあります:
{"ops:world-patent-data": {
"@xmlns": {
"ops": "http://ops.epo.org",
"$": "http://www.epo.org/exchange",
"ccd": "http://www.epo.org/ccd",
"xlink": "http://www.w3.org/1999/xlink"
},
"ops:meta": {
"@name": "elapsed-time",
"@value": "31"
},
"exchange-documents": {"exchange-document": {
"@system": "ops.epo.org",
"@family-id": "35636806",
"@country": "EP",
"@doc-number": "1814517",
"@kind": "A1",
"bibliographic-data": {
"publication-reference": {"document-id": [
{
"@document-id-type": "docdb",
"country": {"$": "EP"},
"doc-number": {"$": "1814517"},
"kind": {"$": "A1"},
"date": {"$": "20070808"}
},
{
"@document-id-type": "epodoc",
"doc-number": {"$": "EP1814517"},
"date": {"$": "20070808"}
}
]},
"classifications-ipcr": {"classification-ipcr": [
{
"@sequence": "1",
"text": {"$": "A61K 9/ 08 A I"}
},
{
"@sequence": "2",
"text": {"$": "A61K 31/ 19 A I"}
},
{
"@sequence": "3",
"text": {"$": "A61K 31/ 216 A I"}
},
{
"@sequence": "4",
"text": {"$": "A61K 47/ 00 A I"}
},
{
"@sequence": "5",
"text": {"$": "C07C 57/ 38 A I"}
},
{
"@sequence": "6",
"text": {"$": "C07C 229/ 42 A I"}
}
]},
"patent-classifications": {"patent-classification": [
{
"@sequence": "1",
"classification-scheme": {
"@office": "EP",
"@scheme": "EC"
},
"classification-symbol": {"$": "A61K9/00M5"}
},
{
"@sequence": "2",
"classification-scheme": {
"@office": "EP",
"@scheme": "EC"
},
"classification-symbol": {"$": "A61K31/19"}
},
{
"@sequence": "3",
"classification-scheme": {
"@office": "EP",
"@scheme": "EC"
},
"classification-symbol": {"$": "A61K31/216"}
}
]},
"application-reference": {
"@doc-id": "16272416",
"document-id": [
{
"@document-id-type": "docdb",
"country": {"$": "EP"},
"doc-number": {"$": "05808069"},
"kind": {"$": "A"}
},
{
"@document-id-type": "epodoc",
"doc-number": {"$": "EP20050808069"},
"date": {"$": "20051019"}
},
{
"@document-id-type": "original",
"doc-number": {"$": "05808069"}
}
]
},
"priority-claims": {"priority-claim": [
{
"@sequence": "1",
"@kind": "national",
"document-id": [
{
"@document-id-type": "epodoc",
"doc-number": {"$": "WO2005IN00339"},
"date": {"$": "20051019"}
},
{
"@document-id-type": "original",
"doc-number": {"$": "IN2005000339"}
}
]
},
{
"@sequence": "2",
"@kind": "national",
"document-id": [
{
"@document-id-type": "epodoc",
"doc-number": {"$": "IN2004DE02332"},
"date": {"$": "20041122"}
},
{
"@document-id-type": "original",
"doc-number": {"$": "DE23322004"}
}
]
}
]},
"parties": {
"applicants": {"applicant": [
{
"@sequence": "1",
"@data-format": "epodoc",
"applicant-name": {"name": {"$": "VENUS REMEDIES LTD [IN]"}}
},
{
"@sequence": "1",
"@data-format": "original",
"applicant-name": {"name": {"$": "VENUS REMEDIES LIMITED"}}