今天我用ajax获取外部api值并显示在html中,但是从ajax中获取值是成功的,但是我不知道如何显示它,所以我留下一个问题。
下面的代码被称为来自外部 api 的 json 值。
{
"addr": "address",
"code": "38807050",
"created_at": "2020/03/28 13:15:00",
"lat": x axis,
"lng": y axis,
"name": "store name",
"remain_stat": "1",
"stock_at": "2020/03/28 11:37:00",
"type": "01"
}
我想让从外部 api 调用的 json 值如下图所示。我怎样才能得到那里调用的价值?
<div class="row pt-4 px-5 moreBox" style="display: none;">
<div class="pb-5 col-md-5">
<iframe width="100%" height="300" src="https://maps.google.com/maps?q=New%20York&z=14&output=embed" scrolling="no" frameborder="0"></iframe></div>
<div class="col-md-6">
<h1 class="">store name</h1>
<p class="lead">address</p>
<h5 class="">created at</h5>
<h6 class="">stock_at</h6>
</div>
</div>