0

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

Edited by pyTony: fixed formating

3
Contributors
3
Replies
4
Views
5 Years
Discussion Span
Last Post by stultuske
0
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?

0
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

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.