My dictionary structure is as follows:
var data = {
a: [1, 2, 3, 4, 5],
b: [
[1, 2],
[3, 4],
[5, 6]
]
};
Currently, I am using ng-hide
to hide an element if the value 2
exists in data->a
. Here's how it's implemented:
<i ng-hide="(data.a | filter:2).length">2 not found</i>
Now, I want to achieve the same functionality for data->b
. I need to hide the message if the value 2
is found in any of the items within data->b
.
I came across a solution on How do I only show an element if nested ng-repeat is not empty?, but my requirement is slightly different as I need to display the message only once.