Click here to Skip to main content
14,363,914 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.
 
AnswerRe: JSON responses -- what's your preference? Pin
Chris Maunder3-Apr-19 10:17
adminChris Maunder3-Apr-19 10:17 
AnswerRe: JSON responses -- what's your preference? Pin
dandy723-Apr-19 11:19
memberdandy723-Apr-19 11:19 
QuestionRe: JSON responses -- what's your preference? Pin
Super Lloyd3-Apr-19 14:51
memberSuper Lloyd3-Apr-19 14:51 
AnswerRe: JSON responses -- what's your preference? Pin
agolddog4-Apr-19 3:45
memberagolddog4-Apr-19 3:45 
AnswerRe: JSON responses -- what's your preference? Pin
Kirk 103898214-Apr-19 5:25
memberKirk 103898214-Apr-19 5:25 
AnswerRe: JSON responses -- what's your preference? Pin
Gerry Schmitz4-Apr-19 14:06
mveGerry Schmitz4-Apr-19 14:06 
AnswerRe: JSON responses -- what's your preference? Pin
paheal4-Apr-19 20:44
professionalpaheal4-Apr-19 20:44 
AnswerRe: JSON responses -- what's your preference? Pin
maze34-Apr-19 23:47
professionalmaze34-Apr-19 23:47 
Here is my 2 cents of crazy.

In JS I have an Array. let my_array = ["hi"];

It is going well. push, pop, shift, filter, map...

Now I want to add some number counter say Groups, to save searching how many distinct groups are in the Array?

my_array._groups = 44;

So that works.
I can check the number of groups.

Now I need to store my my_array. JSON?
Well, JSON.stringify(my_array), only captures the array and does not include _groups.

Using an object my_array = {array=["hi"]};
we store _groups =44.

Now JSON.strinigy contains _groups.
but calls to array require either putting through a wrapper object to pass through functions, or adding .array between the functions.

Conclusion: I am not sure what my brain is thinking today. Maybe the second wrapper has benefits as you said. Smile | :)

AnswerRe: JSON responses -- what's your preference? Pin
thewazz8-Sep-19 10:39
professionalthewazz8-Sep-19 10:39 
GeneralSo... Pin
#realJSOP3-Apr-19 1:55
mve#realJSOP3-Apr-19 1:55 
GeneralRe: So... Pin
CodeWraith3-Apr-19 2:04
memberCodeWraith3-Apr-19 2:04 
GeneralRe: So... Pin
OriginalGriff3-Apr-19 2:11
protectorOriginalGriff3-Apr-19 2:11 
GeneralRe: So... Pin
HobbyProggy3-Apr-19 2:16
professionalHobbyProggy3-Apr-19 2:16 
GeneralRe: So... Pin
OriginalGriff3-Apr-19 2:31
protectorOriginalGriff3-Apr-19 2:31 
GeneralRe: So... Pin
HobbyProggy9-Apr-19 2:01
professionalHobbyProggy9-Apr-19 2:01 
GeneralRe: So... Pin
Eddy Vluggen3-Apr-19 2:19
mveEddy Vluggen3-Apr-19 2:19 
GeneralRe: So... Pin
CodeWraith3-Apr-19 2:26
memberCodeWraith3-Apr-19 2:26 
GeneralRe: So... Pin
Eddy Vluggen3-Apr-19 3:25
mveEddy Vluggen3-Apr-19 3:25 
GeneralRe: So... Pin
CodeWraith3-Apr-19 3:34
memberCodeWraith3-Apr-19 3:34 
GeneralRe: So... Pin
Tom Deketelaere3-Apr-19 4:24
professionalTom Deketelaere3-Apr-19 4:24 
GeneralRe: So... Pin
Eddy Vluggen3-Apr-19 5:01
mveEddy Vluggen3-Apr-19 5:01 
GeneralRe: So... Pin
Tom Deketelaere3-Apr-19 5:22
professionalTom Deketelaere3-Apr-19 5:22 
GeneralRe: So... Pin
David Crow3-Apr-19 4:25
memberDavid Crow3-Apr-19 4:25 
QuestionRe: So... Pin
Eddy Vluggen3-Apr-19 5:02
mveEddy Vluggen3-Apr-19 5:02 
AnswerRe: So... Pin
David Crow3-Apr-19 5:44
memberDavid Crow3-Apr-19 5:44 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.