I need to create a key value pair in the following format:
// KEY VALUE //
'order[email]'=>'demo@user.com',
'order[shipping_method]'=>'flatrate_flatrate',
'order[payment_method]'=>'checkmo',
'billing[entity_id]'=>1,
'billing[street]'=>'1959 Settlers Lane',
'billing[city]'=>'Culver City',
'billing[country_id]'=>'US',
'billing[region]'=>'California',
'shipping[entity_id]'=>1,
'shipping[first_name]'=>'John',
'shipping[middle_name]'=>'A',
'shipping[last_name]'=>'Deo',
'shipping[company]'=>'',
I tried creating like this but I guess I am doing something wrong
// key value pair
$scope.list = [
{ 'order[email]' : "akashkt09@gmail.com" },
{ 'order[shipping_method]': "flatrate_flatrate"},
{ 'order[payment_method]':"checkmo"},
{ 'billing[entity_id]':"3"},
{ 'billing[street]':"street10"},
{ 'billing[city]':"GuangZhou"},
{ 'billing[country_id]':"IN" },
{ 'billing[region]':null},
{ 'billing[region_id]':"0"},
{ 'billing[postcode]':"834005"},
{ 'billing[telephone]':"8860052373"},
{ 'billing[fax]':null},
{ 'shipping[entity_id]':"3"},
{ 'shipping[street]':"street10"},
{ 'shipping[city]':"GuangZhou"},
{ 'shipping[country_id]':"IN" },
{ 'shipping[region]':null},
{ 'shipping[region_id]':"0"},
{ 'shipping[postcode]':"834005"},
{ 'shipping[telephone]':"8860052373"},
{ 'shipping[fax]':null},
{ 'shipping[first_name]':"Akash"},
{ 'shipping[last_name]':"Kumar"}
];
Any help would be appreciated. Thanks in advance.