How to create dictionary and add key–value pairs dynamically?

后端 未结 15 758
没有蜡笔的小新
没有蜡笔的小新 2020-11-28 00:37

From post:

Sending a JSON array to be received as a Dictionary

I’m trying to do this same thing as that post. The only issue is that I d

15条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-11-28 01:20

    var dictionary = {};//create new object
    dictionary["key1"] = value1;//set key1
    var key1 = dictionary["key1"];//get key1
    

提交回复
热议问题