I'm using an ng-repeat where each object (item) is as below:
{
"properties":
[
{"value":"started","key":"status"},
{"value":"somename","key":"name"},
{"value":"10","key":"age"},
]
}
How do I get the value corresponding to key 'status'
I have tried:
<span class="badge">{{item.properties['value'] | filter:{item:{properties:{key:'status'}}}}}</span>
but no luck.
Thanks, Rohith
item.properties['value']returns a string. You are then passing that string through angular'sfilterfunction to match an object structure - this will not work for obvious reasons. Are you just trying to get the value of the item with a given key?