KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
From post: Sending a JSON array to be received as a Dictionary<string,string> , I'm trying to do this same thing as that post. The only issue is that I don't know what the keys and the values are upfront. So I need to be able to dynamically add the key and value pairs and I don't know how to do that. How can I create that object and add key value pairs dynamically? I've tried: var vars = [{key:"key", value:"value"}]; vars[0].key = "newkey"; vars[0].value = "newvalue"; But that doesn't work.
Tags (comma-separated)
Save Edits
Cancel