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. ( - GSONlib) some examples here
- Sort list. It is simple task. For example you can use - Collections.sort(List<T> var0, Comparator<? super T> var1)from- java.util packagesome examples here
- Search 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