I have 2 JSON objects and want to compare when a property of the first one appears in the second one.
Is there a way to do this using angular filters?
my html:
<div class="col-xs-6">
<h1>prematch</h1>
<ul ng-repeat="field in prematch | unique:'FIELD1'">
<li> {{ field.FIELD1 }}</li>
<li> {{ field.FIELD2 }}</li>
<li><b>{{ field.url }}</b></li>
<li>{{ field.FIELD7 }}</li>
</ul>
</div>
<div class="col-xs-6">
<h1>live</h1>
<input ng-model="searchText">
<ul ng-repeat="field in live | filter:searchText ">
<li> {{ field.FIELD1 }}</li>
<li> {{ field.FIELD2 }}</li>
<li><b>{{ field.url }}</b></li>
<li>{{ field.FIELD7 }}</li>
</ul>
</div>
so...I want to filter the second ng-repeat with field.url in prematch
(if field.url in prematch
exists as field.url in live
I want them displayed, otherwise not).
If you need further info about the controller or data structure let me know, but I think this is enough.