Tagged Questions
15
votes
9answers
10k views
Comparing two arrays in Javascript
I'd like to compare two arrays... ideally, efficiently. Nothing fancy, just true if they are identical, and false if not. Not surprisingly, the comparison operator doesn't seem to work.
var a1 = ...
1
vote
1answer
27 views
mysql return print in array twice
I am trying to get mysql to put everything into a array which would be easier for me to work with later down the road.
I currently am using the following
$result = mysql_query('SELECT * FROM ...
0
votes
2answers
22 views
Accessing JSON array node inside an object
I've been having trouble with accessing a JSON array node inside another object.
The JSON file I'm trying to read basically looks like this:
[
{
"dependencies": [ "data"
]
}
]
I've got to the ...
-1
votes
2answers
67 views
0
votes
1answer
19 views
Show valid JSON array from query
I have a function to show a JSON array containing multiple registration id and data. I am using CodeIgniter. I tried to use notification using this library.
public function ...
-2
votes
3answers
36 views
interpreting JSON with PHP and putting it in array
I have only worked with JSON once before, but I don't recall how to use it with PHP.
If I have a script that returns JSON like this:
{
"bunisess":[
"business",
"bonuses",
"burnooses",
...
-1
votes
1answer
53 views
Parsing json into an array to show plain text in NSLog
I have downloaded some json data from a json call now Iam trying to parse the following json into an array so that I can see a list of the questions in my NSlog?
e.g
NSLog(@"Questions:Air cleaner ...
0
votes
1answer
83 views
Confusion on how to use functions in javascript
This is what I am trying to implement.
var globalVar = [];
var tomakeJson = JSON.Stringify(globalVar);
window.load = function familyWork() {
fatherWork: function() {
// return ...
0
votes
1answer
26 views
ZF2 JSON array gives a extra not added key back
In my application I created a autocomplete on the search input. When I return the data from my database it's adding a extra key to the array I did not added named '"searchForm":{}'.
Because of this ...
-1
votes
3answers
68 views
how to send an array as a parameter to json service in iOS
I am using iPhone JSON Web Service based app.I need to pass input parameter as an array to a JSON web Service, how can I do this?
Array Contains 12 elements.
Here am providing sample service...
input ...
0
votes
1answer
26 views
php json saving and reading multiple arrays to file
I am trying to save multiple php arrays one at a time. The arrays come to me from a parser function also one at a time. I used to keep them all in memory and then write them all at once like this:
...
0
votes
3answers
57 views
Inserting array element using foreach
Hi i am working on a simple script where i would like to output the result of a given SQL query into JSON.
This is what i have so far:
$player = $this->game->getPlayer(5);
$leaderboard= ...
0
votes
3answers
54 views
JSON - reading nested data from a json file?
Here is my JSON data :
{
"main": [
{
"main_id": "1234",
"main_sub": [
{
"main_info": {
"main_1" : "A",
...
1
vote
3answers
7k views
How to access stdclass object after a specific key value pair?
I have a stdclass object as shown below:
stdClass Object
(
[text] => Parent
[values] => Array
(
[0] => stdClass Object
(
...
1
vote
1answer
32 views
Remove array from JSON decode
Here's the function I'm using to grab and process a JSON input:
<?php
$json = "http://pastebin.com/raw.php?i=ihAapq30";
$cache_lastfm = 'BLAHBLAHDIR/'.sha1($json).'.json';
...