hi,
I have created one array in java script like this:

     obj.push({'key' :value1, 'key2' :value2})

and it is stored in database ,but problem is that when I am retrieving again back from database I am confusing to how to get array from database because it is stored in following format :

[object Object],[object Object],[object Object] :-these are totallay 3 values.

how to get this array and how to separate key value pair in java

Object[] row = new Object[3];
for ( int i = 0; i < 3; i++)
  row[i] = readObjectFromDB();

if you don't know up front how many items there will be, use a List or a Collection.
is your key stored in the DB?

Object[] row = new Object[3];
for ( int i = 0; i < 3; i++)
  row[i] = readObjectFromDB();

if you don't know up front how many items there will be, use a List or a Collection.
is your key stored in the DB?

but he/she is talking about javascript :D

not really :)

how to get this array and how to separate key value pair in java

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.