Skip to main content

All Questions

Tagged with
1,028 questions with no upvoted or accepted answers
8 votes
0 answers
706 views

Modify a JSON file while preserving object key order

What is a good way to parse a JSON file in NodeJS, make minor modifications to it, then write it back to disk, without changing the order of any of the keys of any of the objects within it? To ...
Steve Bennett's user avatar
4 votes
3 answers
452 views

JS: Delete Object Key if all nested Values equal null

From a given data structure (json file) I basically need to render a table. Empty rows and/or columns should not render. I'm fairly new to JavaScript and tried different approaches (converting to ...
chef_digital's user avatar
4 votes
2 answers
126 views

Map relationships between Array Objects

Given the JSON of various Pokemon Battles: [ { "battleID": "1", "trainers": [ { "LastName": "Ketchum", "ForeName": "Ash" }, ...
SaintPepsi's user avatar
4 votes
2 answers
218 views

Javascript Search Nested Object with Regex

I have this: var foo = { "Category1": [ {"Company1": {"URL": ["DomainName1", "DomainName2"]}}, ... ], ... } Normally, I would access ...
user5013538's user avatar
3 votes
0 answers
951 views

Convert String to Object in PowerShell

I get a string from a Web-Request and I want to get a specific value from this response. The string of the response looks like: [ "BeginOfEnumerable", [ { "...
Mec-Eng's user avatar
  • 199
3 votes
1 answer
2k views

Generate a random number in a php class

I am doing an exercise I found online to teach myself php. The program I am making is a "Guess the Number" game where I need to generate a random number to be guessed. I was successful in the exercise ...
Bex's user avatar
  • 71
3 votes
1 answer
864 views

Remove of extra curly brackets with 0 index in json object

Here I want to remove one curly brackets and one zero in the json object . I have tried a lot ,but did n't succeeded . Below I am posting my codes ,please have a look . { "responseCode": 200, "...
sradha's user avatar
  • 2,234
3 votes
1 answer
247 views

How to abstract a value from an object within an object?

I am a little stuck on how to get a value from an object within an object. I have tried numerous methods but cant seem to return the value. var results return Json this: { "Date": "2016-12-14" "...
user3515765's user avatar
3 votes
0 answers
63 views

How to input an object into a promise looping through each key using jQuery?

Inputting object into promise looping through each key using jQuery. I have a fault finding application that dynamically pulls through questions and answer based upon the JSON response from and AJAX ...
James Parsons's user avatar
3 votes
0 answers
307 views

Creating JSONArray from JSONObjects

I have json libs (json-simple) and trying to make jsonarray from jsonobjects. My aim to make JSON string look something like string below [{"name": "somename","surname": "somesurname"}, {"name": "...
TheOriginalNickname's user avatar
3 votes
2 answers
1k views

Loop AsyncTask class and fetch Json and store as object in list

I want to connect to an Api which returns me JSON values depending on what I enter as GET request. This JSON structure is always exactly the same only the values from these properties differ. All ...
Rien's user avatar
  • 428
3 votes
3 answers
101 views

Comparing elements in an object

i am working on a scraper that saves results to a json like this: {"Productos" : [ {"Title":"Grabador de voz ISD1932","Results": [ {"Stock":1,"Price":11.4,"Fecha":"18-8-2014:3:36"}, {"...
Mimetix's user avatar
  • 272
3 votes
1 answer
1k views

Child Objects Undefined

I have some JSON being parsed in via jQuery and loaded into an object $framework. I can call console.log($framework) and it returns this: Object List item currentPage: Object hash: "...
Davidnbrooks's user avatar
3 votes
0 answers
3k views

Check if parameter is present in JSON object at any depth

An API returns a JSON response at undefinable depth where some elements may or not be included. How do I check if a property is present? Some of the parameters include weird names like @param or $. ...
chris's user avatar
  • 31
3 votes
1 answer
4k views

openweathermap api: get 1 time slot from 5 day forcast

I am using the openweathermap api 5 day/ 3 hour forecast I get the following result set. There are multiple results for each day. Every 3 hours have a result. Here is the api call in full to get the ...
RRB's user avatar
  • 2,086

15 30 50 per page
1
2 3 4 5
69