Nested Arrays issue in Handlbars

I’m trying to multiply the given quantity of a line item by another quantity per line item but I’m running into issues because the line items are within a nested array and the expression isn’t working.

Here’s what I have for the expression :

image

Error I am getting:

Message: Could not compile handle bar "{{multiply lookupData[0].lineItems.[0].quantity returnData.returnQuantity}}" because "Parse error on line 1:
{{multiply lookupData[0].lineIt
-----------^
Expecting 'CLOSE_RAW_BLOCK', 'CLOSE', 'CLOSE_UNESCAPED', 'OPEN_SEXPR', 'CLOSE_SEXPR', 'ID', 'OPEN_BLOCK_PARAMS', 'STRING', 'NUMBER', 'BOOLEAN', 'UNDEFINED', 'NULL', 'DATA', 'SEP', got 'INVALID'" .Please correct and retry

Here’s the data I’m working with:

{
  "return-date": "2025-07-23T05:50:32+00:00",
  "order-id": "114-1561338-9294632",
  "sku": "CBFH3812-TC122570-PKG",
  "asin": "B09P47V197",
  "fnsku": "X003A0T49L",
  "product-name": "Conquest Structural Wood Screws - 0.275\" x 14\" ICC Certified Heavy-Duty Self Tapping Flat Head T30 Star Drive Screws (Pack of 25)",
  "quantity": "2",
  "fulfillment-center-id": "LEX1",
  "detailed-disposition": "CUSTOMER_DAMAGED",
  "reason": "UNWANTED_ITEM",
  "status": "Unit returned to inventory",
  "license-plate-number": "LPNNE5XJLGJGD",
  "returnData": {
    "returnQuantity": 2,
    "orderID": "114-1561338-9294632",
    "reason": "UNWANTED_ITEM",
    "reasonDetails": "CUSTOMER_DAMAGED",
    "returnSKU": "CBFH3812-TC122570-PKG"
  },
  "lookupData": [
    {
      "type": "kititem",
      "lineItems": [
        {
          "sku": "CBFH3812",
          "quantity": 2
        },
        {
          "sku": "TC122570",
          "quantity": 3
        }
      ]
    }
  ]
}

You forgot a .
You have lookupData[0]
but it must be lookupData.[0]

That’s embarrassing thanks Nuri!

No worries, it can happen to all of us, at the end of the day, we are all human. :slight_smile: