Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6663839
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T02:32:37+00:00 2026-05-26T02:32:37+00:00

now a days i am working on blackberry within that i parse some JSON

  • 0

now a days i am working on blackberry within that i parse some JSON Array into String and from that i convert it into Hashtable like this

this is my JSON string

[ 
  { 
        "StdID":"A1",
  "RollNo":"23",
 "Class":"First"

}, 
{ 
        "StdID":"A2",
  "RollNo":"13",
 "Class":"First"

}, 
{ 
        "StdID":"A3",
  "RollNo":"53",
 "Class":"Second"

}, 
{ 
        "StdID":"A4",
  "RollNo":"33",
 "Class":"Third"

}, 

]

and i parse this into hashtable as

Hashtable t1=new Hashtable();
t1.put("StdID","A1");
t1.put("RollNo","23");
t1.put("Class","First");
Hashtable t2=new Hashtable();
t2.put("StdID","A2");
t2.put("RollNo","13");
t2.put("Class","First");
Hashtable t3=new Hashtable();
t3.put("StdID","A3");
t3.put("RollNo","53");
t3.put("Class","Second");
Hashtable t4=new Hashtable();
t4.put("StdID","A4");
t4.put("RollNo","33");
t4.put("Class","Third");

Hashtable main=new Hashtable ();

main.put(new Integer(1), t1);
main.put(new Integer(2), t2);
main.put(new Integer(3), t3);
main.put(new Integer(4), t4);

So can i/ how can i retrieve the value as

select students which have First class

so any one can help me?
is this possible by LINQ ?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T02:32:37+00:00Added an answer on May 26, 2026 at 2:32 am

    Uhm… yes! But you need this library for Java LINQ stuff: //github.com/nicholas22/jpropel-light

    How to do it:

    import java.util.Hashtable;
    import lombok.ExtensionMethod;
    import propel.core.utils.Linq;
    import java.util.List;
    import lombok.Function;
    
    @ExtensionMethod({Linq.class})
    public class Main
    {
    
      public static void main(String[] args)
      {
        Hashtable t1=new Hashtable();
        t1.put("StdID","A1");
        t1.put("RollNo","23");
        t1.put("Class","First");
        Hashtable t2=new Hashtable();
        t2.put("StdID","A2");
        t2.put("RollNo","13");
        t2.put("Class","First");
        Hashtable t3=new Hashtable();
        t3.put("StdID","A3");
        t3.put("RollNo","53");
        t3.put("Class","Second");
        Hashtable t4=new Hashtable();
        t4.put("StdID","A4");
        t4.put("RollNo","33");
        t4.put("Class","Third");
    
        Hashtable main = new Hashtable();
        main.put(new Integer(1), t1);
        main.put(new Integer(2), t2);
        main.put(new Integer(3), t3);
        main.put(new Integer(4), t4);
    
        List<Hashtable> result= main.values().where(classEquals("First")).toList();
        for(Hashtable ht : result)
          System.out.println(ht.get("StdID"));
      }
    
    
      @Function
      private static Boolean classEquals(Hashtable table, String _class) {
        return table.get("Class") != null && table.get("Class").equals(_class);
      }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've been working on a rails app for a couple of days now that
I've been working on that for 2 days now. Reading everything I could find
I've been working on this for a few days now, and I've found several
I have been working on this problem for 2 days now and it's an
I've been working on this for a couple of days now without success. Basically,
I've been working in ASP.NET for several years now (since the 1.0 days!), but
I am learning ASP.NET MVC now a days and I have found that most
I was learning flex for a few days now and suddenly noticed that input
been working on this for two days now and seem to be getting nowhere.
I have been working on this issue for a few days now and can't

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.