Javascript JSON stringify No Numeric Index to include in Data

前端 未结 8 1467
天涯浪人
天涯浪人 2021-01-28 10:52

i am trying to pass non numeric index values through JSON but am not getting the data.

var ConditionArray = new Array();
ConditionArray[0] = \"1\";
ConditionArra         


        
8条回答
  •  陌清茗
    陌清茗 (楼主)
    2021-01-28 11:03

    If you change the first line to

    var ConditionArray = new Object();
    

    you will achieve the desired outcome.

提交回复
热议问题