type の応答では、変数でapplication/x-javascript
必要なJSON
部分を選択しています。以下はJSON
-
{
"__ra":1,
"payload":null,
"data":[
[
"replace",
"",
true,
{
"__html": "\u003Cspan class=\"highlight fsm\" id=\"u_c_0\">I want this text only\u003C\/span>"
}
]
]
}
Stackoverflow から取得した参照からdata
、次の方法で内部のコンテンツを選択できます-
var temp = JSON.parse(resp).data;
__html
しかし、私の目的は、値のテキスト部分のみを取得することですI want this text only
。誰か助けて。