我从外部API
(external API)获得以下值。我认为这是JSON
对象。如何以角度打印此值?
{
"job_details": {
"job_title": "Cook",
"company_email": "suryaadisiva@gmail.com",
"industry": "Advertisement",
"phone_no": "9746448899",
"days_to_join_id": "2",
"days_to_join": "Within a week",
"participatestatus": "0",
"job_type_name": "Full Time",
"Qualficationprofileflag": "1",
"jobview_count": "1",
"company_id": "440",
"job_add_date": "2019-02-26 09:33:36",
"minimum_qual": "10th/SSLC",
"Skills": "Chinese",
"jobgender": "Female",
"date_diff": 1,
"experience": "2 - 3 years",
"salary": "Rs 10,000 - 15,000"
},
"jobtoshowflag": "1",
"jobdeleted": 0
}
以上是来自外部API
的格式。什么是用html语法将其打印成角形?
答案 0 :(得分:0)
将回复保存为variable
说data
data = {
"job_details": {
"job_title": "Cook",
"company_email": "suryaadisiva@gmail.com",
"industry": "Advertisement",
"phone_no": "9746448899",
"days_to_join_id": "2",
"days_to_join": "Within a week",
"participatestatus": "0",
"job_type_name": "Full Time",
"Qualficationprofileflag": "1",
"jobview_count": "1",
"company_id": "440",
"job_add_date": "2019-02-26 09:33:36",
"minimum_qual": "10th/SSLC",
"Skills": "Chinese",
"jobgender": "Female",
"date_diff": 1,
"experience": "2 - 3 years",
"salary": "Rs 10,000 - 15,000"
},
"jobtoshowflag": "1",
"jobdeleted": 0
}
HTML
<h1>{{data.jobtoshowflag}}</h1>
<h1>{{data.job_details.job_title}}</h1>