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.
for (var tablename in original.test) { tableName = tablename; }
tableName包含 JSON 的属性名称。如何读取属性内的值tableName?我尝试了以下方式但没有工作:
tableName
for (var index in "original.test."+tableName+" ) {}
original.test[tableName]
以后请尝试谷歌。
你可以做:
当您尝试original.test.tableName时,它会尝试查找名为“tableName”的属性
original.test.tableName