I am getting a list of objects in JSON form. After storing this list I need to be able to search/sort this list by any attribute of it. For example, My data is product data, and products have a price
attribute. Is there any library that helps with sorting by price and/or searching by product name?
Asked
Active
Viewed 96 times
0

Hashem
- 31
- 1
- 6
1 Answers
1
you should decomposite task on few:
Parse JSON data to java objects. (
GSON
lib) some examples hereSort list. It is simple task. For example you can use
Collections.sort(List<T> var0, Comparator<? super T> var1)
fromjava.util package
some examples hereSearch by list. It is simple task too. You can use for example
stream().filter
. some examples here

Wai Ha Lee
- 8,598
- 83
- 57
- 92

Alexander Prisadkov
- 237
- 1
- 9