Click here to Skip to main content
15,887,327 members
Home / Discussions / JavaScript
   

JavaScript

 
JokeRe: java code on hospital management Pin
Karthik_Mahalingam31-Oct-17 16:57
professionalKarthik_Mahalingam31-Oct-17 16:57 
AnswerRe: java code on hospital management Pin
ZurdoDev25-Oct-17 1:50
professionalZurdoDev25-Oct-17 1:50 
JokeRe: java code on hospital management Pin
Karthik_Mahalingam31-Oct-17 16:58
professionalKarthik_Mahalingam31-Oct-17 16:58 
Questionhow to calculate the number of working hours in Week excluding Weekends in JavaScript or jquery using Moment.js Pin
Member 1346136812-Oct-17 3:24
Member 1346136812-Oct-17 3:24 
Rant[Repost] how to calculate the number of working hours in Week excluding Weekends in JavaScript or jquery using Moment.js Pin
Richard Deeming12-Oct-17 3:53
mveRichard Deeming12-Oct-17 3:53 
QuestionExecute functions based on certain time delay and ignore other functions execution Pin
Member 1346008011-Oct-17 16:11
Member 1346008011-Oct-17 16:11 
AnswerRe: Execute functions based on certain time delay and ignore other functions execution Pin
Karthik_Mahalingam16-Oct-17 1:31
professionalKarthik_Mahalingam16-Oct-17 1:31 
QuestionJSON with number as key Pin
V.11-Oct-17 2:42
professionalV.11-Oct-17 2:42 
I need to parse a JSON in javascript.
This works fine if the JSON is like:
JavaScript
{"test":[{"data":{" ...
where I can access the data like (if arg was "receiveddata" in the callback function)
recieveddata.test[index].data ...

but know I'm in the case where I have this:
JavaScript
{"1":[{"data":{"date_of  //notice the "1" as key
There is no way I can access the data like above as receiveddata.1[index].data ...

How can I access the data? (or should I ask the source to update their key names)

(I'm using the jQuery getJSON function, which works fine on other JSON's where there are normal keys.)

thanks.
V.
(MQOTD rules and previous solutions)

AnswerRe: JSON with number as key Pin
Afzaal Ahmad Zeeshan11-Oct-17 6:37
professionalAfzaal Ahmad Zeeshan11-Oct-17 6:37 
GeneralRe: JSON with number as key Pin
V.11-Oct-17 20:05
professionalV.11-Oct-17 20:05 
QuestionHow to hide f12 devloper tool from the browser? Pin
Member 1345865211-Oct-17 0:30
Member 1345865211-Oct-17 0:30 
AnswerRe: How to hide f12 devloper tool from the browser? Pin
F-ES Sitecore11-Oct-17 1:03
professionalF-ES Sitecore11-Oct-17 1:03 
QuestionAngular releases Pin
BrunoFaitalaas9-Oct-17 22:36
BrunoFaitalaas9-Oct-17 22:36 
AnswerRe: Angular releases Pin
Nathan Minier10-Oct-17 2:44
professionalNathan Minier10-Oct-17 2:44 
GeneralRe: Angular releases Pin
Karthik_Mahalingam11-Oct-17 21:21
professionalKarthik_Mahalingam11-Oct-17 21:21 
PraiseRe: Angular releases Pin
Jeremy Falcon7-Nov-17 22:30
professionalJeremy Falcon7-Nov-17 22:30 
QuestionWhy not the output is 3 in java script object for the line console.log(home.count) Hope i am making it clear. Pin
Member 110968437-Oct-17 5:14
Member 110968437-Oct-17 5:14 
AnswerRe: Why not the output is 3 in java script object for the line console.log(home.count) Hope i am making it clear. Pin
Richard Deeming9-Oct-17 8:52
mveRichard Deeming9-Oct-17 8:52 
QuestionBug in try catch statement can I can't find where. Pin
Jason Lemon3-Oct-17 16:11
Jason Lemon3-Oct-17 16:11 
GeneralRe: Bug in try catch statement can I can't find where. Pin
PIEBALDconsult3-Oct-17 17:28
mvePIEBALDconsult3-Oct-17 17:28 
QuestionRe: Bug in try catch statement can I can't find where. Pin
Richard MacCutchan3-Oct-17 21:44
mveRichard MacCutchan3-Oct-17 21:44 
AnswerRe: Bug in try catch statement can I can't find where. Pin
Karthik_Mahalingam4-Oct-17 17:53
professionalKarthik_Mahalingam4-Oct-17 17:53 
AnswerRe: Bug in try catch statement can I can't find where. Pin
ZurdoDev11-Oct-17 9:48
professionalZurdoDev11-Oct-17 9:48 
AnswerRe: Bug in try catch statement can I can't find where. Pin
Weavr8-Apr-18 1:58
Weavr8-Apr-18 1:58 
QuestionJavascript Pin
Member 134419482-Oct-17 15:59
Member 134419482-Oct-17 15:59 

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.