ruby on rails - !map:HashWithIndifferentAccess convert to JSON or other formats -


when query via rails console data of invoice. returns !map:hashwithindifferentaccess text. see example below.

"--- !map:hashwithindifferentaccess \nformat: xml\ninvoice: !map:hashwithindifferentaccess \n reference: 5-00000003r\n invoice_lines: \n - !map:hashwithindifferentaccess \n price: \"2.50\"\n product_id: \"177698\"\n quantity: \"-1.00\"\n
discount_text: 10%\n retail_price: \"25.00\"\n subtotal: \"-2.50\"\n payments: \n - !map:hashwithindifferentaccess \n
payment_type_id: \"6\"\n amount: \"-20.09\"\n tender: \"-20.09\"\n invoice_date: \"2015-06-04t05:56:44z\"\n remark: cancelled order\n customer_id: \"182029\"\n tax_inclusive: \"true\"\n invoice_tax_rates: \n - !map:hashwithindifferentaccess \n rate: \"0.12\"\n amount: \"0.27\"\naction: create\ncontroller: api_invoices\n"

what need product ids in invoice lines attribute of invoice. how parse text?


Comments

Popular posts from this blog

javascript - Bootstrap Popover: iOS Safari strange behaviour -

Magento/PHP - Get phones on all members in a customer group -

session - Logging Out Using PHP -