I'm building the JSON string "by hand" server-side.
Should I Convert.ToString(System.DateTime.Milliseconds) on the server-side and use javascript Date.setTime(milliseconds) on the client side?
|
I have a view that I want to be converted into JSON. What is the SQL that I can use to produce on the server the JSON string needed to be ... |
I am using the following method to basically create a JSON string.
var saveData = {};
saveData.a = 2;
saveData.c = 1;
However the .a and .c don't cut it for what I need to ... |
This is probably a no-brainer, but how can I make this happen:
var name = otherObject.name; //"string"
var o = {
...
|
I have two js arrays already, say: names and values (with the same length), now I would like to construct a json object in certain format? For example:
names = ["label1","label2","label3"];
...
|
How do I refer to an element of JSON (Javascript) object.
exampe: alert(homes.Agents[1].name);
<script>
var homes = [
{
"Agents" : {
...
|
I must be missing something simple here, but I'm having trouble retrieving data from a JSON array response. I can access objects with identifiers that start with letters, but not ones ... |
|
I have a function that will get a JSON array with objects. In the function I will be able to loop through the array, access a property and use that property. ... |
My json object looks like:
User { ID: 234, name: 'john', ..);
I want to build a string of all the ID's.
How can I do this? is there a more elegant way than ... |
I'm using PHP to return a json_encode()'d array for use in my Javascript code. It's being returned as:
{"parent1[]":["child1","child2","child2"],"parent2[]":["child1"]}
By using the following code, I am able to access parent2 > child1
$.getJSON('myfile.php', function(data)
{
...
|
I'm using PHP to fetch "tasks" from my database and encoding it as JSON. When I transfer the data over to javascript, I end up with something like this:
Array {
...
|
Lets say I have two types of documents stored in my CouchDB database. First is with property type set to contact and second to phone. Contact type document have another property ... |
I have a JSON object that can (is) storing a Date (and/or any other JS object) but I'm not sure how to get it out once it's in it. For example ... |
I have JSON,like,
var jsondata = {
"an_array" : [[2,4],[1,2]]
}
With JavaScript, I want to use a for loop to go through each element of the array in the array, like,
var ...
|
I have a code that gets in the end collection of two JSON objects, something like this.
var jsonL1 = {"holder1": {}}
var jsonL2 = {"section":"0 6","date":"11/12/13"}
I would like to insert jsonL2 ... |
I've been monkeying with Javascript for several years now (since back in the day before Gmail, Facebook, and YouTube, if you believe such a day existed). Big high-five to Thau.
My Question, ... |
I have written the following Javascript code. It's the best I could do to get my data formatted as valid JSON:
var roles = getSelectedRoles(); // returns an Array object
/* TODO: ...
|
I got a realy simple question:
Take a look at this JSON String:
this.objects = [{"pid":"2","x":"10","y":"10"}]; // only one i know
Now i would like to adress an object out of it like ... |
I got server responsed JSON data:
var data = SERVER_RESPONSE;
this data could be an object {id: 12, name: John},
it could also be an array of objects [{id: 12, name: John}, {id: ... |
What I mean by that is say I have JSON data as such:
[{"ADAM":{"TEST":1}, "BOBBY":{"TEST":2}}]
and I want to do something like this:
var x = "ADAM";
alert(data.x.TEST);
|
Hi I have a JSON string that looks like this:
{"2000":["1", "2", "3"],"2001":["1", "2", "3"],"2002":["1", "2", "3"]}
The string above comes from the "backend" and my JavaScript function receives the JSON string as ... |
I'm having some problems with converting some JSON and I'm after some help. This is my problem, I have JSON returned the following:
Example of the JSON recieved (from a CSV ... |
My class
[Serializable]
public class VSpecialQualifiers
{
public VCD LivingStatus { get; set; }
...
|
I have seen a tutorial that has the following JSON:
{
books:[{title:"frankenstein"},{title:"Moby Dick"}]
}
When I put the above into js.bin I get an error saying that it expect a string and ... |
Good morning,
I am new to JSON and am trying to re-implement a page using JSON instead of some 2-dimensional arrays.
What I am hoping to accomplish is get an array of objects. ... |
I want to encode a javascript object into a json string and I am having considerable difficulties.
The Object looks something like this
new_tweets[k]['tweet_id'] = 98745521;
new_tweets[k]['user_id'] = 54875; ...
|
I'm writing code to set up a lookup structure in Javascript
var g_Codes = {
"Type1": {
"U.S.": "US1",
...
|
I have an html like below
HTML:
<INPUT TYPE=CHECKBOX NAME="clcik" onClick="add('1234','blah')" />
<input type="hidden" id="project" value="" />
JS:
function add(obj1 , obj2){
var jsonArray = [];
...
|
I have the following JSON object in javascript returned by a PHP web service :
data={
"result": "pass",
"error_type": "",
"feedback_ids": {
"feedback0": "1",
"feedback1": "8"
},
"redirect_uri": ""
}
alert(data.result) works ... |
So I have a Module object, and I have a AdvModule object which inherits from Module using the following:
function object(o) {
function F() { }
...
|
I have a JSON object that is a nested array that is of the following form:
{
"name": "Math",
"children": [
...
|
I'm trying to add a set of objects that have been retrieved from a JSON file into an array. I've tried using push but the result is the same. The length ... |
Say I want the object to be something like this:
var Book = {
title: "the catcher in the rye",
...
|
I get some json data, and there I have such a structure:
'modules' : {
'category1' : {
'section1' : {
...
|
|
|
|