使用Var获取属性 [英] getting a property using Var
问题描述
大家好,
Am使用REST通过使用 "var"
Am using REST to fetch list items by passing a column value using "var"
我从data.d.results中的列表中获得了我的一组值,
i have my set of values from the list in data.d.results,
如何从data.d.results中获取该特定列的值,
how can i fetch the value of that particular column from data.d.results,
coz如果我将var名称传递给data.d.results(var ColValue = data.d.results.ColumnName),它会将ColValue的值显示为Undefined,
coz if i pass the var name to data.d.results (var ColValue = data.d.results.ColumnName) it shows the value of ColValue as Undefined,
如何通过将具有列名称的Var传递给data.d.results
how can i get the value of column by passing the Var which has column name to data.d.results
类似
var ColumnName ="ABCD"
在REST调用后
var ColValue = data.d.Results [i] .ColumnName
感谢
推荐答案
您可以使用开发者工具(IE-> F12 )进行监控 返回的数据,这样可以帮助您获取所需的数据.
You could use developer tool(IE->F12,inert a breakpoint->start debug->refresh your page) to monitor the returned data so it would help you get the required data.
例如:
这里可以使用正确的路径来获取数据.d.results[0].修改后的值.
您可以在此处查看更多详细信息.
李
这篇关于使用Var获取属性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!