data type of inventory line item

data type of inventory line item

In Flow, I can fetch an invoice, along with many components of that invoice.  However, I can't see quantity, serial numbers, and I'm interested in pulling those out via Flow.  

When I grab an invoice, here's the LineItems debugging when I email it to myself, so I know I can get that information.  But when I pipe this LineItems variable into a custom function, I've tried list functions, map functions, and collection functions, and I keep getting errors.  Looking at the data, I think this is a Map since we have Name:value pairs running throughout.  

If I want to get quantity, I've been doing code that looks like this, and in Flow, I pass the variable corresponding to the lineitems ${fetchInvoice_2.line_items} that I know holds the invoice's line items (since I'm debugging by emailing it to myself). 

int GetQuant(map LineItems)
{
Quant = LineItems.Get("quantity");
return Quant;
}

I see "quantity" in the following blog of line items, so I must be missing something.  Is it not a map?  Or is there a conversion that needs to take place inside a custom function before I can find the value?

Line items =

[{"bcy_rate":0.12,"is_combo_product":false,"salesorder_item_id":"","line_item_id":"1928754000006995151","header_id":"","documents":[],"discount_amount":0,"item_type":"sales_and_purchases","purchase_rate":0,"description":"","discount":0,"item_order":0,"discounts":[],"bill_item_id":"","rate":0.12,"project_id":"","account_name":"Sales, Subscriptions","package_details":{"weight_unit":"lb","length":"","width":"","weight":"","dimension_unit":"in","height":""},"sku":"ST999","pricebook_id":"","bill_id":"","quantity":1,"image_document_id":"","item_id":"1928754000006705195","track_serial_for_package":false,"expense_receipt_name":"","tax_name":"State","item_total":0.12,"header_name":"","item_custom_fields":[],"tax_id":"1928754000000995053","tags":[],"unit":"","account_id":"1928754000000000391","cost_amount":0,"tax_type":"tax","time_entry_ids":[],"name":"SubTest","tax_percentage":0,"expense_id":"","serial_numbers":[]}, {"bcy_rate":0.04,"is_combo_product":true,"salesorder_item_id":"","line_item_id":"1928754000006995153","header_id":"","documents":[],"discount_amount":0,"item_type":"inventory","purchase_rate":0.03,"description":"texty","discount":0,"item_order":1,"discounts":[],"bill_item_id":"","rate":0.04,"project_id":"","account_name":"Sales, Hardware","package_details":{"weight_unit":"lb","length":"","width":"","weight":"","dimension_unit":"in","height":""},"sku":"TTC","pricebook_id":"","tax_exemption_code":"NON-PROFIT FORM ON FILE","bill_id":"","quantity":1,"image_document_id":"","item_id":"1928754000006705037","track_serial_for_package":false,"expense_receipt_name":"","tax_name":"","item_total":0.04,"header_name":"","item_custom_fields":[],"tax_id":"","tax_exemption_id":"1928754000000784198","tags":[],"unit":"box","account_id":"1928754000000000388","warehouse_name":"Zoo Industries","cost_amount":0,"tax_type":"tax","time_entry_ids":[],"name":"Tiny Composite","tax_percentage":0,"expense_id":"","warehouse_id":"1928754000006780081","serial_numbers":["4567"]}, {"bcy_rate":0.08,"is_combo_product":false,"salesorder_item_id":"","line_item_id":"1928754000006995155","header_id":"","documents":[],"discount_amount":0,"item_type":"sales_and_purchases","purchase_rate":25,"description":"","discount":0,"item_order":2,"discounts":[],"bill_item_id":"","rate":0.08,"project_id":"","account_name":"Shipping Charges","package_details":{"weight_unit":"lb","length":"","width":"","weight":"","dimension_unit":"in","height":""},"sku":"SHD","pricebook_id":"","bill_id":"","quantity":1,"image_document_id":"","item_id":"1928754000001112965","track_serial_for_package":false,"expense_receipt_name":"","tax_name":"State","item_total":0.08,"header_name":"","item_custom_fields":[],"tax_id":"1928754000000995053","tags":[],"unit":"","account_id":"1928754000000014001","cost_amount":0,"tax_type":"tax","time_entry_ids":[],"name":"Shipping (Domestic)","tax_percentage":0,"expense_id":"","serial_numbers":[]}]