Win a copy of The Way of the Web Tester: A Beginner's Guide to Automating Tests this week in the Testing forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to selectively get values from Map

willie wright
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I am having lots of trouble figuring out how to get specific values from a Map. I understand that a Map returns objects.

The elements in the map will always stay the same, however, the order can be different.

How can I do something like this:

Object value2 = facetQuery.get("prc:[50 TO 74.99]");

Here is my code:

Here is the output:

Thank you!


Oh, this worked:
Integer value2 = facetQuery.get("prc:[50 TO 74.99]") ;
out.println("this(" + value2 + ")");
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic