0

Seems like a very basic question but I can't get the syntax right, my json array

{"varremise":[
    {"name":"Devise",
     "vars":["EUR","USD","Notprovided","Notprovided"]
    },...
}

Can anyone help to get the list of vars without Notprovided String, i have write this but it dont work

 <option ng-repeat="ite in item.vars | filter:{ vars: '!Notprovided'}" value="{{ite}}">{{ite}}</option>
10
  • 2
    What's the item variable? Commented Jul 2, 2015 at 9:06
  • 1
    <div class="col-md-6" ng-repeat="item in varremise"> Commented Jul 2, 2015 at 9:08
  • So you're filtering item.vars, that's to say ["EUR","USD","Notprovided","Notprovided"]. Do you see where is you error now? Commented Jul 2, 2015 at 9:18
  • i havn't understant, can you explain more please Commented Jul 2, 2015 at 9:21
  • Have a look again: your filter is {vars: '…'}, but you're filtering ["EUR","USD","Notprovided","Notprovided"]. Do you see what's going on, now? Commented Jul 2, 2015 at 9:23

1 Answer 1

1

Best and shortest way:

<option ng-repeat="ite in item.vars | filter:'!Notprovided'" value="{{ite}}">{{ite}}</option>
Sign up to request clarification or add additional context in comments.

4 Comments

Thank you for you answer sir Alpha-Centuri, but It dont work
edited it, most probably you were not adding proper controller in my previous answer
@darkman, but in comment you say Blackhole, that this don't work
aay excuse me, i havent well see his answer, i thinked thats propse me item.vars:'!Notprovided' excuse me @Blackhole

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.