This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes HTML, CSS and JavaScript and the fly likes Retrieving array from database Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Retrieving array from database" Watch "Retrieving array from database" New topic
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: 12761
    
    5
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
Roberto Perillo
Bartender

Joined: Dec 28, 2007
Posts: 2258
    
    3

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: 60800
    
  65

JSON is just a text string. You can store a JSON string in any text column that's big enough to hold it.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by 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' :""}
 
wood burning stoves
 
subject: Retrieving array from database
 
Similar Threads
hoe to retrieve image from MySql database?
how to retrieve image from database?
Converting Blob to word
StreamCorruptedException