| Author |
Retrieving array from database
|
pravin rasal
Ranch Hand
Joined: Jul 27, 2011
Posts: 63
|
|
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
|
 |
William Brogden
Author and all-around good cowpoke
Rancher
Joined: Mar 22, 2000
Posts: 12271
|
|
Exactly how did you store this JavaScript in the database?
I don't understand what you mean by
[object Object],[object Object],[object Object] :-
why not as just a single JSON string?
Bill
|
Java Resources at www.wbrogden.com
|
 |
Roberto Perillo
Bartender
Joined: Dec 28, 2007
Posts: 2212
|
|
|
I think this has more to do with HTML and JavaScript. So, let's move this one to the HTML, CSS and JavaScript forum.
|
Cheers, Bob "John Lennon" Perillo
SCJP, SCWCD, SCJD, SCBCD - Daileon: A Tool for Enabling Domain Annotations
|
 |
pravin rasal
Ranch Hand
Joined: Jul 27, 2011
Posts: 63
|
|
|
if i want to store JSON in database then how can I store JSON in database in the form of key value pair and also I want to retrieve JSONfrom database then how can I get this JSON
|
 |
Bear Bibeault
Author and ninkuma
Marshal
Joined: Jan 10, 2002
Posts: 56229
|
|
|
JSON is just a text string. You can store a JSON string in any text column that's big enough to hold it.
|
[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
|
 |
pravin rasal
Ranch Hand
Joined: Jul 27, 2011
Posts: 63
|
|
I want to store element at run time means I have two combo box and when I am changing value of both combo box the value will be stored in JSON if I am changing combo box
three times then total number of three values will be stored in JSON
my json is :
var data ={'concent' :"", 'conce2' :""}
|
 |
 |
|
|
subject: Retrieving array from database
|
|
|