gpt4 book ai didi

javascript - 当json数据在数组中时,如何在div中显示json数据

转载 作者:搜寻专家 更新时间:2023-11-01 04:48:30 25 4
gpt4 key购买 nike

<分区>

我正在尝试在我的应用页面中显示作为 Ajax 回调接收的数据。数据有点像这样:

"data": [
{
"name": "Rehan",
"location": "Pune",
"description": "hello hi",
"created_by": 13692,
"users_name": "xyz",
},
{
"name": "Sameer",
"location": "Bangalore",
"description": "how are you",
"created_by": 13543,
"users_name": "abc",
},

API 包含100 多个数据,那么我们如何在html 页面中显示这些数据。像这样:

Name: Rehan
location: Pune
Description: hello hi
created by: 13692
user name: xyz

编辑

或者,如评论/解决方案中所建议,如何将数据显示为 HTML 表格?

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com