开发者社区 问答 正文

怎样把对象数组转换成想要的格式?

par是链接的参数,不确定是多少个。所以传过来是个对象数组,
怎样不确定的数组放到data{}之中呢?
screenshot

展开
收起
小旋风柴进 2016-05-27 08:16:07 2228 分享 版权
1 条回答
写回答
取消 提交回答
  • 你这样吧:

    var dataObj = par;
    
    dataObj.mobile = mobile;
    
    mui.ajax(url, function(){
        data: dataObj,
        dataType: 'json',
        type: 'get',
        timeout: 10000
    });
    2019-07-17 19:16:51
    赞同 展开评论
问答地址: