How to print object data in javascript
- by rxzhang
I have the following object data:
var response = {
"response": {
"numFound": 7945,
"docs": [{
"description": "target",
"url": "target",
"id": "269653",
"score": 6.9186745
},
{
"description": "Target Kent",
"url": "Target_Kent",
"id": "37275",
"score": 4.3241715
}]
},
"highlighting": {
"269653": {
"description": ["<em>target</em>"]
},
"37275": {
"description": ["<em>Target</em> Kent"]
}
}
};
I can use response.response.docs[0].description to print out "target". But I don't know how to print out "<em>target</em>". Thanks.