Jump to content

Why can't JSON.Stringify convert an associative array to JSON code?????


gregaryb

Recommended Posts

The array is nested similar to this example.

 

 {
  "Students": [
  
			  { "Name":"Amit Goenka" ,
  "Major":"Physics" }, 
			  { "Name":"Smita Pallod" ,
  "Major":"Chemistry" }, 
			  { "Name":"Rajeev Sen" , 
  "Major":"Mathematics" }
			  ]
			  }

All I get is an empty string. Why?

Do I really have to manually code my own function that PROPERLY converts my associative arrays to JSON?
Or is there a better quality library some where that can include to convert my associative arrays?
Damn nuisance!

Associative array in firefox developer tools

https://drive.google.com/file/d/1Ij0E_WgaHqU0qFXr8xWkp7Brj18T-Qic/view?usp=sharing

 

Edited by gregaryb
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...