• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Rob Spoor
  • Devaka Cooray
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
  • Tim Holloway
Bartenders:
  • Jj Roberts
  • Al Hobbs
  • Piet Souris

Find values in a List of Maps that have key color ?

 
Ranch Hand
Posts: 327
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm trying to learn groovy and spock . I'm wondering if someone could help me with this?

I have a list of maps with key "color" and want to verify each map's value individually.




The key "KeyID" is unique where all other keys can have duplicate values.  When a value is always the same I have used "every{}" to verify the value for a key. Example the value for the key "load" is always 9999.
But what I can't figure out is when the value can be different for a key?  I am wonder if there is a way to reference / filter on the unique value of KeyID first THEN verify the other key for each map?


 
Lisa Austin
Ranch Hand
Posts: 327
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
So I think I may have figured out how to use the find{} with this.   Thank You
 
reply
    Bookmark Topic Watch Topic
  • New Topic