var people =[{title:'Alan', hasChild:true},
{title:'Alice', hasDetail:true},
{title:'Amos', header'A'},
{title:'Alonzo'},
{title:'Brad'},
{title:'Brent'},
{title:'Billy'},
{title:'Brenda'},
{title:'Callie'},
{title:'Cassie'},
{title:'Chris'}];
我想检查一下这个数组,它是否包含一个密钥,值是header:value
。我想检查这个每个元素。如何检查数组中是否有键:值或不?
我什至不能在那里看到一个数组。请尝试发布一些**真实的**代码。 – 2011-05-09 10:23:51
将代码更改为数组 – 2011-05-09 10:26:22