Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
[{"EmployeeID":1,"Name":"Alice","Age":20,"SSN":123456789}]
这是从 SQL 查询返回的 JSON 文件。我想从此 JSON 文件中提取名称
我找到了:
由于这会从表中返回一组记录,因此可以按如下方式使用索引
var 员工 = retrieveById(empID); // 作为记录数组返回
字符串员工姓名=员工[0].姓名;// 从第 0 个索引(第 1 条记录)中提取名称