如何查询字符串参数转换成JSON对象我写如何解码查询字符串参数以JSON对象
var actualappt = {
RoomId: 1, HotelId: 29, BookingStartDate: Sept 26 2014, BookingEndDate: Sept 26 2014 , BookingStatusId: '1', BookingTypeId: '1', DepositAmount: 3000, NoOfRooms: 2, UnitPrice: 4000,
Customers: { GuestName: rk, MobileNo: 5656566555, Email: [email protected], Address: hyd }, Payment_Mode_Id: 4
};
var stringsata = JSON.stringify(actualappt);
var queryString = $.param(actualappt);
现在我能够转换JSON对象查询字符串,并发送至
代码下一页,在我的页面我想要反向过程,即从查询字符串到JSON对象
仅供参考:这不是JSON。 – epascarello 2014-10-02 12:35:49
@epascarello正确。这是一个普通的对象。 – GuyT 2014-10-02 12:36:21
请参阅http://stackoverflow.com/questions/1131630/the-param-inverse-function-in-javascript-jquery – magritte 2014-10-02 12:48:27