How can I create an empty typed JSON object in javascript?
For example
Creates me a JSON object with two items in the array "users".
What if I wanted users to be strongly typed, but empty? Then add items using the push method?
Any ideas?
For example
Code:
var data={"users":[ { "firstName":"Ray", "lastName":"Villalobos", "joined":2012 }, { "firstName":"John", "lastName":"Jones", "joined":2010 } ]}
What if I wanted users to be strongly typed, but empty? Then add items using the push method?
Any ideas?
Comment